[PATCH] net: phy: marvell: make two functions static

Subsystems: ethernet phy library, networking drivers, the rest

STALE3424d

3 messages, 2 authors, 2017-06-02 · open the first message on its own page

[PATCH] net: phy: marvell: make two functions static

From: Colin King <hidden>
Date: 2017-06-02 11:14:28

From: Colin Ian King <redacted>

functions m88e1510_get_temp_critical and m88e1510_get_temp_alarm can be
made static as they not need to be in global scope.

Cleans up sparse warnings:
 "symbol 'm88e1510_get_temp_alarm' was not declared. Should it be static?"
 "symbol 'm88e1510_get_temp_critical' was not declared. Should it be 
  static?"

Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/phy/marvell.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 7c2cde45c262..dc679cdf96be 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1704,7 +1704,7 @@ static int m88e1510_get_temp(struct phy_device *phydev, long *temp)
 	return ret;
 }
 
-int m88e1510_get_temp_critical(struct phy_device *phydev, long *temp)
+static int m88e1510_get_temp_critical(struct phy_device *phydev, long *temp)
 {
 	int oldpage;
 	int ret;
@@ -1735,7 +1735,7 @@ int m88e1510_get_temp_critical(struct phy_device *phydev, long *temp)
 	return ret;
 }
 
-int m88e1510_set_temp_critical(struct phy_device *phydev, long temp)
+static int m88e1510_set_temp_critical(struct phy_device *phydev, long temp)
 {
 	int oldpage;
 	int ret;
-- 
2.11.0

Re: [PATCH] net: phy: marvell: make two functions static

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-06-02 14:00:18

On Fri, Jun 02, 2017 at 12:14:24PM +0100, Colin King wrote:
From: Colin Ian King <redacted>

functions m88e1510_get_temp_critical and m88e1510_get_temp_alarm can be
made static as they not need to be in global scope.

Cleans up sparse warnings:
 "symbol 'm88e1510_get_temp_alarm' was not declared. Should it be static?"
 "symbol 'm88e1510_get_temp_critical' was not declared. Should it be 
  static?"
Hi Colin

What about m88e1510_get_temp_alarm()? That should also have a static.

Thanks
     Andrew

Re: [PATCH] net: phy: marvell: make two functions static

From: Colin Ian King <hidden>
Date: 2017-06-02 14:04:13

On 02/06/17 15:00, Andrew Lunn wrote:
On Fri, Jun 02, 2017 at 12:14:24PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>

functions m88e1510_get_temp_critical and m88e1510_get_temp_alarm can be
made static as they not need to be in global scope.

Cleans up sparse warnings:
 "symbol 'm88e1510_get_temp_alarm' was not declared. Should it be static?"
 "symbol 'm88e1510_get_temp_critical' was not declared. Should it be 
  static?"
Hi Colin

What about m88e1510_get_temp_alarm()? That should also have a static.
Ah, good point, I somehow missed that one. I'll send a V2

Colin
Thanks
     Andrew
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help