]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mwl8k: refactor some conditionals for clarity
authorJohn Linville <linville@tuxdriver.com>
Mon, 10 Aug 2015 16:05:39 +0000 (12:05 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 18 Aug 2015 06:03:22 +0000 (09:03 +0300)
commitbafc6e4cd897ef14015d8d32a04ee9bfa8d91370
treedeec15340652e5b77955b15ef85e53d95ef12784
parent9ff4b6de26a72f76450943548ee7d9d779eeaac5
mwl8k: refactor some conditionals for clarity

CC [M]  drivers/net/wireless/mwl8k.o
drivers/net/wireless/mwl8k.c: In function ‘mwl8k_bss_info_changed’:
drivers/net/wireless/mwl8k.c:3290:2: warning: ‘ap_mcs_rates’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  memcpy(cmd->mcs_set, mcs_rates, 16);
  ^
drivers/net/wireless/mwl8k.c:4987:5: note: ‘ap_mcs_rates’ was declared here
  u8 ap_mcs_rates[16];
     ^

The warning was bogus.  But the conditionals were rather complicated,
with multiple redundant checks.  This consolidates the checking and
makes it more readable IMHO.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mwl8k.c