diff mbox

staging: wilc1000: remove unnecessary local array

Message ID 20170209134839.12138-1-fdemathieu@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Franck Demathieu Feb. 9, 2017, 1:48 p.m. UTC
It fixes the following warning reported by sparse:

  drivers/staging/wilc1000/linux_wlan.c:67:33: warning: too long initializer-string for array of char(no space for nul char)

Signed-off-by: Franck Demathieu <fdemathieu@gmail.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Greg KH Feb. 10, 2017, 2:02 p.m. UTC | #1
On Thu, Feb 09, 2017 at 02:48:39PM +0100, Franck Demathieu wrote:
> It fixes the following warning reported by sparse:
> 
>   drivers/staging/wilc1000/linux_wlan.c:67:33: warning: too long initializer-string for array of char(no space for nul char)
> 
> Signed-off-by: Franck Demathieu <fdemathieu@gmail.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)


Always use scripts/get_maintainer.pl to determine who to send patches
to.

Please fix up and try again.

thanks,

greg k-h
diff mbox

Patch

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 2eebc62..fc61f4e 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -64,7 +64,6 @@  static int dev_state_ev_handler(struct notifier_block *this,
 	u8 *ip_addr_buf;
 	struct wilc_vif *vif;
 	u8 null_ip[4] = {0};
-	char wlan_dev_name[5] = "wlan0";
 
 	if (!dev_iface || !dev_iface->ifa_dev || !dev_iface->ifa_dev->dev)
 		return NOTIFY_DONE;
@@ -113,7 +112,7 @@  static int dev_state_ev_handler(struct notifier_block *this,
 			wilc_optaining_ip = false;
 		}
 
-		if (memcmp(dev_iface->ifa_label, wlan_dev_name, 5) == 0)
+		if (memcmp(dev_iface->ifa_label, "wlan0", 5) == 0)
 			wilc_set_power_mgmt(vif, 0, 0);
 
 		wilc_resolve_disconnect_aberration(vif);