[PATCH 1/4] commands: miitool: Constify 'phydevname' in mdiobus_show()
Andrey Smirnov
andrew.smirnov at gmail.com
Mon Dec 4 07:37:23 PST 2017
It seems like mdiobus_show() doesn't need more than read-only to
'phydevname', so constify it to allow passing const stings in.
Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
commands/miitool.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/commands/miitool.c b/commands/miitool.c
index 07bce1865..1a46037f2 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -225,7 +225,8 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
return 0;
}
-static void mdiobus_show(struct device_d *dev, char *phydevname, int verbose)
+static void mdiobus_show(struct device_d *dev, const char *phydevname,
+ int verbose)
{
struct mii_bus *mii = to_mii_bus(dev);
int i;
--
2.14.3
More information about the barebox
mailing list