Skip to content

Commit 7e0bdf1

Browse files
geertuglikely
authored andcommitted
of: Make of_get_phy_mode() return int i.s.o. const int
include/linux/of_net.h:16: warning: type qualifiers ignored on function return type Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Grant Likely <grant.likely@linaro.org>
1 parent 8be137f commit 7e0bdf1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/of/of_net.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static const char *phy_modes[] = {
3939
* The function gets phy interface string from property 'phy-mode',
4040
* and return its index in phy_modes table, or errno in error case.
4141
*/
42-
const int of_get_phy_mode(struct device_node *np)
42+
int of_get_phy_mode(struct device_node *np)
4343
{
4444
const char *pm;
4545
int err, i;

‎include/linux/of_net.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
#ifdef CONFIG_OF_NET
1111
#include <linux/of.h>
12-
extern const int of_get_phy_mode(struct device_node *np);
12+
extern int of_get_phy_mode(struct device_node *np);
1313
extern const void *of_get_mac_address(struct device_node *np);
1414
#else
15-
static inline const int of_get_phy_mode(struct device_node *np)
15+
static inline int of_get_phy_mode(struct device_node *np)
1616
{
1717
return -ENODEV;
1818
}

0 commit comments

Comments
 (0)