net: dsa: mv88e6xxx: Add missing static to stub functions
Subsystems (4)
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]
--- drivers/net/dsa/mv88e6xxx/global2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/dsa/mv88e6xxx/global2.h +3 -3
@@ -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
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")Signed-off-by Arnd Bergmann <[email protected]>
Thanks,
Vivien
Andrew Lunn
maintainerQuoted 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")Signed-off-by Arnd Bergmann <[email protected]>
Hi Arnd
Dave merged my fix yesterday.
Andrew
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")Signed-off-by Arnd Bergmann <[email protected]>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
Andrew Lunn
maintainerQuoted 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")Signed-off-by Arnd Bergmann <[email protected]>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
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")Signed-off-by Arnd Bergmann <[email protected]>
Applied.