brcmfmac: fix static checker warning in pmklist handling

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Arend van Spriel 2014-11-20 22:26:59 +01:00 committed by John W. Linville
parent ef16ea32db
commit c15d789e3c

View File

@ -2932,7 +2932,7 @@ brcmf_update_pmklist(struct net_device *ndev,
struct brcmf_cfg80211_pmk_list *pmk_list, s32 err) struct brcmf_cfg80211_pmk_list *pmk_list, s32 err)
{ {
int i, j; int i, j;
int pmkid_len; u32 pmkid_len;
pmkid_len = le32_to_cpu(pmk_list->pmkids.npmkid); 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 brcmf_if *ifp = netdev_priv(ndev);
struct pmkid_list *pmkids = &cfg->pmk_list->pmkids; struct pmkid_list *pmkids = &cfg->pmk_list->pmkids;
s32 err = 0; s32 err = 0;
int i; u32 pmkid_len, i;
int pmkid_len;
brcmf_dbg(TRACE, "Enter\n"); brcmf_dbg(TRACE, "Enter\n");
if (!check_vif_up(ifp->vif)) 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 brcmf_if *ifp = netdev_priv(ndev);
struct pmkid_list pmkid; struct pmkid_list pmkid;
s32 err = 0; s32 err = 0;
int i, pmkid_len; u32 pmkid_len, i;
brcmf_dbg(TRACE, "Enter\n"); brcmf_dbg(TRACE, "Enter\n");
if (!check_vif_up(ifp->vif)) if (!check_vif_up(ifp->vif))