linux/drivers/net/ethernet/ibm
Michal Suchanek 6881b07fdd ibmvnic: Fix possibly uninitialized old_num_tx_queues variable warning.
GCC 7.5 reports:
../drivers/net/ethernet/ibm/ibmvnic.c: In function 'ibmvnic_reset_init':
../drivers/net/ethernet/ibm/ibmvnic.c:5373:51: warning: 'old_num_tx_queues' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/net/ethernet/ibm/ibmvnic.c:5373:6: warning: 'old_num_rx_queues' may be used uninitialized in this function [-Wmaybe-uninitialized]

The variable is initialized only if(reset) and used only if(reset &&
something) so this is a false positive. However, there is no reason to
not initialize the variables unconditionally avoiding the warning.

Fixes: 635e442f4a ("ibmvnic: merge ibmvnic_reset_init and ibmvnic_init")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-03 08:46:24 -08:00
..
ehea net: ehea: convert tasklets to use new tasklet_setup() API 2020-09-14 13:02:37 -07:00
emac of: Remove of_dev_{get,put}() 2021-02-12 19:23:39 -06:00
ibmveth.c ibmveth: Fix use of ibmveth in a bridge. 2020-10-27 17:52:51 -07:00
ibmveth.h net/ethtool: Introduce link_ksettings API for virtual network devices 2020-02-29 21:48:55 -08:00
ibmvnic.c ibmvnic: Fix possibly uninitialized old_num_tx_queues variable warning. 2021-03-03 08:46:24 -08:00
ibmvnic.h net: re-solve some conflicts after net -> net-next merge 2021-02-16 23:12:23 -08:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00