From: Arend van Spriel <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 1/4] brcmfmac: fix static checker warning in pmklist handling
Date: Thu, 20 Nov 2014 22:26:59 +0100 [thread overview]
Message-ID: <1416518822-29585-2-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1416518822-29585-1-git-send-email-arend@broadcom.com>
The patch fixes a static checker warning:
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c:2965
brcmf_cfg80211_set_pmksa()
warn: can 'pmkid_len' be negative?
The answer to the question above is likely no so changing its
type to unsigned is sufficient.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
index f8a9dfa..d1928de 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
@@ -2932,7 +2932,7 @@ brcmf_update_pmklist(struct net_device *ndev,
struct brcmf_cfg80211_pmk_list *pmk_list, s32 err)
{
int i, j;
- int pmkid_len;
+ u32 pmkid_len;
pmkid_len = le32_to_cpu(pmk_list->pmkids.npmkid);
@@ -2960,8 +2960,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *ndev,
struct brcmf_if *ifp = netdev_priv(ndev);
struct pmkid_list *pmkids = &cfg->pmk_list->pmkids;
s32 err = 0;
- int i;
- int pmkid_len;
+ u32 pmkid_len, i;
brcmf_dbg(TRACE, "Enter\n");
if (!check_vif_up(ifp->vif))
@@ -3000,7 +2999,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *ndev,
struct brcmf_if *ifp = netdev_priv(ndev);
struct pmkid_list pmkid;
s32 err = 0;
- int i, pmkid_len;
+ u32 pmkid_len, i;
brcmf_dbg(TRACE, "Enter\n");
if (!check_vif_up(ifp->vif))
--
1.9.1
next prev parent reply other threads:[~2014-11-20 21:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 21:26 [PATCH 0/4] brcm80211: minor rework Arend van Spriel
2014-11-20 21:26 ` Arend van Spriel [this message]
2014-11-20 21:27 ` [PATCH 2/4] brcmutil: add helper function to format board revision Arend van Spriel
2014-11-24 21:53 ` John W. Linville
2014-11-25 10:01 ` Arend van Spriel
2014-11-25 18:51 ` John W. Linville
2014-11-20 21:27 ` [PATCH 3/4] brcmsmac: extend hardware info shown in debugfs Arend van Spriel
2014-11-24 21:50 ` John W. Linville
2014-11-25 12:12 ` Arend van Spriel
2014-11-25 13:00 ` Arend van Spriel
2014-11-25 18:50 ` John W. Linville
2014-11-25 18:49 ` John W. Linville
2014-11-25 19:05 ` John W. Linville
2014-11-25 19:16 ` Arend van Spriel
2014-11-25 19:20 ` John W. Linville
2014-11-25 19:49 ` Arend van Spriel
2014-11-25 19:23 ` Arend van Spriel
2014-11-25 19:28 ` Arend van Spriel
2014-11-20 21:27 ` [PATCH 4/4] brcmfmac: correct .disconnect() callback while connecting 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=1416518822-29585-2-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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;
as well as URLs for NNTP newsgroup(s).