From: Franck Demathieu <fdemathieu@gmail.com>
To: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org
Subject: [PATCH] staging: wilc1000: remove unnecessary local array
Date: Thu, 9 Feb 2017 14:48:39 +0100 [thread overview]
Message-ID: <20170209134839.12138-1-fdemathieu@gmail.com> (raw)
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
next reply other threads:[~2017-02-09 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 13:48 Franck Demathieu [this message]
2017-02-10 14:02 ` [PATCH] staging: wilc1000: remove unnecessary local array 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170209134839.12138-1-fdemathieu@gmail.com \
--to=fdemathieu@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox