Skip to contentSkip to conversation

net: dsa: mv88e6xxx: Add missing static to stub functions

PATCH Applied Arnd Bergmann 4 participants 6 messages May 29, 2017 – May 30, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: mv88e6xxx: Add missing static to stub functions

'static' was not enough, the helpers must be 'static inline'

net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function]

Fixes c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub functions")
---
 drivers/net/dsa/mv88e6xxx/global2.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/dsa/mv88e6xxx/global2.h +3 -3
index d8d3c5abb2a1..14c0be98e0a4 100644
@@ -114,13 +114,13 @@ static inline int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip,
 	return -EOPNOTSUPP;
 }
 
-static int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip, int src_dev,
-				  int src_port, u16 data)
+static inline int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip,
+					 int src_dev, int src_port, u16 data)
 {
 	return -EOPNOTSUPP;
 }
 
-static int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip)
+static inline int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip)
 {
 	return -EOPNOTSUPP;
 }
Signature · 1 line
2.9.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 7 lines · Arnd Bergmann

'static' was not enough, the helpers must be 'static inline'

net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function]

Fixes c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub functions")

Thanks,

Vivien

maintainer
#2 lore raw
In reply to Arnd Bergmann
Quoted 7 lines · Arnd Bergmann

'static' was not enough, the helpers must be 'static inline'

net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function]

Fixes c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub functions")

Hi Arnd

Dave merged my fix yesterday.

Andrew

#3 lore raw
Quoted 6 lines · Andrew Lunn
Quoted 5 lines · Arnd Bergmann

'static' was not enough, the helpers must be 'static inline'

net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function]

Quoted 6 lines
Quoted 2 lines
Fixes c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub functions")

Hi Arnd

Dave merged my fix yesterday.

Hi Andrew,

The only commit I see from you in the net/master branch is the partial fix I referenced in the 'fixes' line (c21fbe29f858), from all I can tell, my fix is still needed on top. Can you check again?

Arnd

maintainer
#4 lore raw
Quoted 12 lines · Arnd Bergmann
Quoted 11 lines · Andrew Lunn
Quoted 7 lines · Arnd Bergmann

'static' was not enough, the helpers must be 'static inline'

net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function]

Fixes c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub functions")

Hi Arnd

Quoted 7 lines
Quoted 1 line

Dave merged my fix yesterday.

Hi Andrew,

The only commit I see from you in the net/master branch is the partial fix I referenced in the 'fixes' line (c21fbe29f858), from all I can tell, my fix is still needed on top. Can you check again?

Hi Arnd

Yes, you are correct. Adding the static was enough to stop the 0-day warnings, but they should also inline.

Andrew

maintainer Applied
#5 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Mon, 29 May 2017 14:56:01 +0200

Quoted 7 lines

'static' was not enough, the helpers must be 'static inline'

net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function]

Fixes c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub functions")

Applied.