* [PATCH] net: dsa: lan9303: make functions lan9303_mdio_phy_{read|write} static
@ 2017-10-03 10:39 Colin King
2017-10-03 12:41 ` Andrew Lunn
2017-10-03 17:20 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-10-03 10:39 UTC (permalink / raw)
To: Andrew Lunn, Vivien Didelot, Florian Fainelli, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The functions lan9303_mdio_phy_write and lan9303_mdio_phy_read are local
to the source and do not need to be in global scope, so make them static.
Cleans up sparse warnings:
symbol 'lan9303_mdio_phy_write' was not declared. Should it be static?
symbol 'lan9303_mdio_phy_read' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/dsa/lan9303_mdio.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/lan9303_mdio.c b/drivers/net/dsa/lan9303_mdio.c
index fc16668a487f..0bc56b9900f9 100644
--- a/drivers/net/dsa/lan9303_mdio.c
+++ b/drivers/net/dsa/lan9303_mdio.c
@@ -67,14 +67,15 @@ static int lan9303_mdio_read(void *ctx, uint32_t reg, uint32_t *val)
return 0;
}
-int lan9303_mdio_phy_write(struct lan9303 *chip, int phy, int reg, u16 val)
+static int lan9303_mdio_phy_write(struct lan9303 *chip, int phy, int reg,
+ u16 val)
{
struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
return mdiobus_write_nested(sw_dev->device->bus, phy, reg, val);
}
-int lan9303_mdio_phy_read(struct lan9303 *chip, int phy, int reg)
+static int lan9303_mdio_phy_read(struct lan9303 *chip, int phy, int reg)
{
struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: lan9303: make functions lan9303_mdio_phy_{read|write} static
2017-10-03 10:39 [PATCH] net: dsa: lan9303: make functions lan9303_mdio_phy_{read|write} static Colin King
@ 2017-10-03 12:41 ` Andrew Lunn
2017-10-03 17:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2017-10-03 12:41 UTC (permalink / raw)
To: Colin King
Cc: Vivien Didelot, Florian Fainelli, netdev, kernel-janitors,
linux-kernel
On Tue, Oct 03, 2017 at 11:39:18AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The functions lan9303_mdio_phy_write and lan9303_mdio_phy_read are local
> to the source and do not need to be in global scope, so make them static.
>
> Cleans up sparse warnings:
> symbol 'lan9303_mdio_phy_write' was not declared. Should it be static?
> symbol 'lan9303_mdio_phy_read' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: lan9303: make functions lan9303_mdio_phy_{read|write} static
2017-10-03 10:39 [PATCH] net: dsa: lan9303: make functions lan9303_mdio_phy_{read|write} static Colin King
2017-10-03 12:41 ` Andrew Lunn
@ 2017-10-03 17:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-10-03 17:20 UTC (permalink / raw)
To: colin.king
Cc: andrew, vivien.didelot, f.fainelli, netdev, kernel-janitors,
linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 3 Oct 2017 11:39:18 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> The functions lan9303_mdio_phy_write and lan9303_mdio_phy_read are local
> to the source and do not need to be in global scope, so make them static.
>
> Cleans up sparse warnings:
> symbol 'lan9303_mdio_phy_write' was not declared. Should it be static?
> symbol 'lan9303_mdio_phy_read' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-03 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 10:39 [PATCH] net: dsa: lan9303: make functions lan9303_mdio_phy_{read|write} static Colin King
2017-10-03 12:41 ` Andrew Lunn
2017-10-03 17:20 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).