alistair23-linux/drivers/net/wireless/broadcom/b43
Arnd Bergmann d825db3462 b43: shut up clang -Wuninitialized variable warning
Clang warns about what is clearly a case of passing an uninitalized
variable into a static function:

drivers/net/wireless/broadcom/b43/phy_lp.c:1852:23: error: variable 'gains' is uninitialized when used here
      [-Werror,-Wuninitialized]
                lpphy_papd_cal(dev, gains, 0, 1, 30);
                                    ^~~~~
drivers/net/wireless/broadcom/b43/phy_lp.c:1838:2: note: variable 'gains' is declared here
        struct lpphy_tx_gains gains, oldgains;
        ^
1 error generated.

However, this function is empty, and its arguments are never evaluated,
so gcc in contrast does not warn here. Both compilers behave in a
reasonable way as far as I can tell, so we should change the code
to avoid the warning everywhere.

We could just eliminate the lpphy_papd_cal() function entirely,
given that it has had the TODO comment in it for 10 years now
and is rather unlikely to ever get done. I'm doing a simpler
change here, and just pass the 'oldgains' variable in that has
been initialized, based on the guess that this is what was
originally meant.

Fixes: 2c0d6100da ("b43: LP-PHY: Begin implementing calibration & software RFKILL support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-04-04 13:14:03 +03:00
..
b43.h b43: fix spelling mistake "hw_registred" -> "hw_registered" 2018-10-01 18:41:34 +03:00
bus.c
bus.h
debugfs.c b43: no need to check return value of debugfs_create functions 2019-02-01 14:35:24 +02:00
debugfs.h
dma.c cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
dma.h
Kconfig b43: Use cordic algorithm from kernel library 2018-11-29 17:30:50 +02:00
leds.c b43/leds: Ensure NUL-termination of LED name string 2018-08-09 18:22:33 +03:00
leds.h
lo.c
lo.h
main.c b43: remove set but not used variable 'wl' 2018-10-05 11:38:06 +03:00
main.h
Makefile
phy_a.h
phy_ac.c
phy_ac.h
phy_common.c b43: Use cordic algorithm from kernel library 2018-11-29 17:30:50 +02:00
phy_common.h b43: Use cordic algorithm from kernel library 2018-11-29 17:30:50 +02:00
phy_g.c
phy_g.h
phy_ht.c
phy_ht.h
phy_lcn.c
phy_lcn.h
phy_lp.c b43: shut up clang -Wuninitialized variable warning 2019-04-04 13:14:03 +03:00
phy_lp.h
phy_n.c b43: remove set but not used variables 'tx_pwr_state,tmp2' 2018-12-13 17:02:17 +02:00
phy_n.h
pio.c
pio.h
ppr.c
ppr.h
radio_2055.c
radio_2055.h
radio_2056.c
radio_2056.h
radio_2057.c
radio_2057.h
radio_2059.c
radio_2059.h
rfkill.c
rfkill.h
sdio.c
sdio.h
sysfs.c
sysfs.h
tables.c
tables.h
tables_lpphy.c
tables_lpphy.h
tables_nphy.c
tables_nphy.h
tables_phy_ht.c
tables_phy_ht.h
tables_phy_lcn.c
tables_phy_lcn.h
wa.c
wa.h
xmit.c
xmit.h