diff options
author | 2021-03-02 20:47:47 +0100 | |
---|---|---|
committer | 2021-03-03 08:46:24 -0800 | |
commit | 6881b07fdd24850def1f03761c66042b983ff86e (patch) | |
tree | f211ed15a4860d601f47d07128955875bdffae94 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | octeontx2-af: cn10k: fix an array overflow in is_lmac_valid() (diff) | |
download | linux-rng-6881b07fdd24850def1f03761c66042b983ff86e.tar.xz linux-rng-6881b07fdd24850def1f03761c66042b983ff86e.zip |
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: 635e442f4a48 ("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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions