All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: wilc1000: remove unnecessary local array
@ 2017-02-09 13:48 Franck Demathieu
  2017-02-10 14:02 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Franck Demathieu @ 2017-02-09 13:48 UTC (permalink / raw)
  To: linux-wireless, devel

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(-)

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);
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] staging: wilc1000: remove unnecessary local array
@ 2017-02-10 15:06 Franck Demathieu
  2017-02-10 20:23 ` Arend Van Spriel
  0 siblings, 1 reply; 4+ messages in thread
From: Franck Demathieu @ 2017-02-10 15:06 UTC (permalink / raw)
  To: linux-wireless, devel; +Cc: aditya.shankar, ganesh.krishna

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(-)

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);
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-10 20:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09 13:48 [PATCH] staging: wilc1000: remove unnecessary local array Franck Demathieu
2017-02-10 14:02 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-02-10 15:06 Franck Demathieu
2017-02-10 20:23 ` Arend Van Spriel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.