2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 15:43:59 +08:00
linux-next/drivers/staging/wilc1000
Arnd Bergmann 735bb39ca3 staging: wilc1000: simplify vif[i]->ndev accesses
With gcc-7, I got a new warning for this driver:

wilc1000/linux_wlan.c: In function 'wilc_netdev_cleanup':
wilc1000/linux_wlan.c:1224:15: error: 'vif[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
wilc1000/linux_wlan.c:1224:15: error: 'vif[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]

A closer look at the function reveals that it's more complex than
it needs to be, given that based on how the device is created
we always get

	netdev_priv(vif->ndev) == vif

Based on this assumption, I found a few other places in the same file
that can be simplified. That code appears to be a relic from times
when the assumption above was not valid.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 18:30:22 +01:00
..
coreconfigurator.c Staging: wilc1000: Compress return logic into one line 2016-10-16 10:27:34 +02:00
coreconfigurator.h Staging: wilc1000: Remove struct typedef 2016-09-13 15:13:16 +02:00
host_interface.c Merge 4.9-rc3 into staging-next 2016-10-30 06:38:44 -04:00
host_interface.h staging: wilc1000: Remove unnecessary extern variables. 2016-10-17 09:54:15 +02:00
Kconfig staging: wilc1000: removes WIRELESS_EXT 2016-03-28 07:30:36 -07:00
linux_mon.c staging: wilc1000: Remove camel case in variable names. 2016-03-28 07:30:36 -07:00
linux_wlan.c staging: wilc1000: simplify vif[i]->ndev accesses 2016-11-16 18:30:22 +01:00
Makefile staging: wilc1000: message_queue: Move code to host interface 2016-06-25 14:39:53 -07:00
TODO drivers: wilc1000: remove references to semaphores 2016-08-21 17:27:16 +02:00
wilc_debugfs.c staging: wilc1000: Replace printk() with pr_info(). 2016-10-16 10:26:05 +02:00
wilc_sdio.c staging: wilc1000: Remove unnecessary extern variables. 2016-10-17 09:54:15 +02:00
wilc_spi.c staging: wilc1000: Remove unnecessary extern variables. 2016-10-17 09:54:15 +02:00
wilc_wfi_cfgoperations.c staging: wilc1000: Remove unnecessary extern variables. 2016-10-17 09:54:15 +02:00
wilc_wfi_cfgoperations.h Staging: wilc1000: Remove unused function WILC_WFI_update_stats 2016-02-20 14:43:48 -08:00
wilc_wfi_netdevice.h staging: wilc1000: Remove unused function wilc_lock_timeout 2016-10-25 10:53:27 +02:00
wilc_wlan_cfg.c staging: wilc1000: Replaced comparison to NULL statements 2016-03-28 07:30:36 -07:00
wilc_wlan_cfg.h staging: wilc1000: wilc_wlan_cfg_init: changes unused argument 2016-02-22 11:48:19 -08:00
wilc_wlan_if.h drivers: wilc1000: remove references to semaphores 2016-08-21 17:27:16 +02:00
wilc_wlan.c staging: wilc1000: remove unnecessary braces 2016-10-02 17:19:51 +02:00
wilc_wlan.h staging: wilc1000: Remove unnecessary extern variables. 2016-10-17 09:54:15 +02:00