From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 1/4] commands: miitool: Constify 'phydevname' in mdiobus_show()
Date: Mon, 4 Dec 2017 07:37:23 -0800 [thread overview]
Message-ID: <20171204153726.11479-2-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20171204153726.11479-1-andrew.smirnov@gmail.com>
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@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-12-04 15:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 15:37 [PATCH 0/4] A bit more consistent interface for "miitool" Andrey Smirnov
2017-12-04 15:37 ` Andrey Smirnov [this message]
2017-12-04 15:37 ` [PATCH 2/4] fs: Introduce devpath_to_name() Andrey Smirnov
2017-12-04 15:37 ` [PATCH 3/4] i.MX: imu-bbu-internal: Make use of devpath_to_name() Andrey Smirnov
2017-12-04 15:37 ` [PATCH 4/4] commands/miitool: Allow specifying PHY by their full path Andrey Smirnov
2017-12-06 14:55 ` [PATCH 0/4] A bit more consistent interface for "miitool" Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171204153726.11479-2-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox