mirror_ubuntu-kernels/drivers/net/wireless/intel/iwlwifi
Arnd Bergmann 5a7d87da8d iwlwifi: mvm: avoid harmless -Wmaybe-uninialized warning
gcc is apparently unablel to track the state of the local 'resp_v2'
variable across the kzalloc() function, and warns about the response
variable being used without an initialization:

drivers/net/wireless/intel/iwlwifi/mvm/nvm.c: In function ‘iwl_mvm_update_mcc’:
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c:727:36: warning: ‘mcc_resp_v1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   resp_cp->n_channels = mcc_resp_v1->n_channels;
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c:721:3: warning: ‘mcc_resp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   memcpy(resp_cp, mcc_resp, resp_len);

The warning showed up in x86 allmodconfig after my patch to
unhide -Wmaybe-uninitialized warnings by default was merged,
though it always existed in randconfig builds. I did not
catch the warning earlier because I was testing on ARM, which
never produced the warning.

This rearranges the code in a way that improves readability for
both humans and the compiler, and that avoids the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6fa52430f0 ("iwlwifi: mvm: change mcc update API")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2016-07-06 01:19:54 +03:00
..
dvm iwlwifi: advertise maximal MPDU length when Rx MQ is supported 2016-07-01 16:51:22 +03:00
mvm iwlwifi: mvm: avoid harmless -Wmaybe-uninialized warning 2016-07-06 01:19:54 +03:00
pcie iwlwifi: pcie: poll RFH for RX DMA stop 2016-07-06 01:16:08 +03:00
iwl-1000.c iwlwifi: make configuration structs smaller 2016-05-10 22:34:06 +03:00
iwl-2000.c iwlwifi: make configuration structs smaller 2016-05-10 22:34:06 +03:00
iwl-5000.c iwlwifi: make configuration structs smaller 2016-05-10 22:34:06 +03:00
iwl-6000.c iwlwifi: make configuration structs smaller 2016-05-10 22:34:06 +03:00
iwl-7000.c iwlwifi: make configuration structs smaller 2016-05-10 22:34:06 +03:00
iwl-8000.c iwlwifi: make configuration structs smaller 2016-05-10 22:34:06 +03:00
iwl-9000.c iwlwifi: pcie: workaround HW shadow registers bug 2016-07-01 18:09:42 +03:00
iwl-agn-hw.h
iwl-config.h iwlwifi: pcie: workaround HW shadow registers bug 2016-07-01 18:09:42 +03:00
iwl-csr.h iwlwifi: pcie: workaround HW shadow registers bug 2016-07-01 18:09:42 +03:00
iwl-debug.c
iwl-debug.h
iwl-devtrace-data.h iwlwifi: pcie: build an A-MSDU using TSO core 2015-12-20 23:27:37 +02:00
iwl-devtrace-io.h
iwl-devtrace-iwlwifi.h iwlwifi: mvm: adapt the firmware assert log to new firmware 2016-03-09 21:05:16 +02:00
iwl-devtrace-msg.h
iwl-devtrace-ucode.h
iwl-devtrace.c
iwl-devtrace.h
iwl-drv.c iwlwifi: change fw.mvm_fw to fw.type 2016-07-06 00:08:21 +03:00
iwl-drv.h
iwl-eeprom-parse.c iwlwifi: advertise maximal MPDU length when Rx MQ is supported 2016-07-01 16:51:22 +03:00
iwl-eeprom-parse.h iwlwifi: consider VHT 160MHz while parsing NVM 2016-05-10 22:14:49 +03:00
iwl-eeprom-read.c
iwl-eeprom-read.h
iwl-fh.h iwlwifi: pcie: poll RFH for RX DMA stop 2016-07-06 01:16:08 +03:00
iwl-fw-error-dump.h iwlwifi: mvm: support dumping UMAC internal txfifos 2016-03-20 13:26:02 +02:00
iwl-fw-file.h iwlwifi: mvm: Support CSA countdown offloading 2016-07-01 18:09:45 +03:00
iwl-fw.h iwlwifi: change fw.mvm_fw to fw.type 2016-07-06 00:08:21 +03:00
iwl-io.c iwlwifi: remove unused parameter from grab_nic_access 2015-12-21 10:11:39 +02:00
iwl-io.h
iwl-modparams.h iwlwifi: advertise maximal MPDU length when Rx MQ is supported 2016-07-01 16:51:22 +03:00
iwl-notif-wait.c
iwl-notif-wait.h
iwl-nvm-parse.c iwlwifi: advertise maximal MPDU length when Rx MQ is supported 2016-07-01 16:51:22 +03:00
iwl-nvm-parse.h iwlwifi: refactor the code that reads the MAC address from the NVM 2016-03-07 13:33:00 +02:00
iwl-op-mode.h
iwl-phy-db.c iwlwifi: mvm: remove redundant alloc_ctx parameter 2016-05-10 22:34:03 +03:00
iwl-phy-db.h iwlwifi: mvm: remove redundant alloc_ctx parameter 2016-05-10 22:34:03 +03:00
iwl-prph.h iwlwifi: mvm: support dumping UMAC internal txfifos 2016-03-20 13:26:02 +02:00
iwl-scd.h
iwl-trans.c
iwl-trans.h iwlwifi: mvm: support dqa queue sharing 2016-07-06 00:47:41 +03:00
Kconfig iwlwifi: remove IWLWIFI_DEBUG_EXPERIMENTAL_UCODE 2016-05-10 22:34:05 +03:00
Makefile