* [patch 3/4] rndis_wlan: make some variables unsigned
@ 2012-02-29 6:36 Dan Carpenter
2012-03-01 10:19 ` Jussi Kivilinna
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-02-29 6:36 UTC (permalink / raw)
To: Jussi Kivilinna; +Cc: John W. Linville, linux-wireless, kernel-janitors
These variables can never be less than zero because we cap them in
get_device_pmkids(). Let's make them unsigned here because it's simpler
to not have to worry about negative numbers when we read the code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index a93cfe2..74e2d1b 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -1790,7 +1790,8 @@ static struct ndis_80211_pmkid *remove_pmkid(struct usbnet *usbdev,
struct cfg80211_pmksa *pmksa,
int max_pmkids)
{
- int i, count, newlen, err;
+ int i, newlen, err;
+ unsigned int count;
count = le32_to_cpu(pmkids->bssid_info_count);
@@ -1830,7 +1831,8 @@ static struct ndis_80211_pmkid *update_pmkid(struct usbnet *usbdev,
struct cfg80211_pmksa *pmksa,
int max_pmkids)
{
- int i, err, count, newlen;
+ int i, err, newlen;
+ unsigned int count;
count = le32_to_cpu(pmkids->bssid_info_count);
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch 3/4] rndis_wlan: make some variables unsigned
2012-02-29 6:36 [patch 3/4] rndis_wlan: make some variables unsigned Dan Carpenter
@ 2012-03-01 10:19 ` Jussi Kivilinna
0 siblings, 0 replies; 2+ messages in thread
From: Jussi Kivilinna @ 2012-03-01 10:19 UTC (permalink / raw)
To: Dan Carpenter; +Cc: John W. Linville, linux-wireless, kernel-janitors
Quoting Dan Carpenter <dan.carpenter@oracle.com>:
> These variables can never be less than zero because we cap them in
> get_device_pmkids(). Let's make them unsigned here because it's simpler
> to not have to worry about negative numbers when we read the code.
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/wireless/rndis_wlan.c
> b/drivers/net/wireless/rndis_wlan.c
> index a93cfe2..74e2d1b 100644
> --- a/drivers/net/wireless/rndis_wlan.c
> +++ b/drivers/net/wireless/rndis_wlan.c
> @@ -1790,7 +1790,8 @@ static struct ndis_80211_pmkid
> *remove_pmkid(struct usbnet *usbdev,
> struct cfg80211_pmksa *pmksa,
> int max_pmkids)
> {
> - int i, count, newlen, err;
> + int i, newlen, err;
> + unsigned int count;
>
> count = le32_to_cpu(pmkids->bssid_info_count);
>
> @@ -1830,7 +1831,8 @@ static struct ndis_80211_pmkid
> *update_pmkid(struct usbnet *usbdev,
> struct cfg80211_pmksa *pmksa,
> int max_pmkids)
> {
> - int i, err, count, newlen;
> + int i, err, newlen;
> + unsigned int count;
>
> count = le32_to_cpu(pmkids->bssid_info_count);
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-01 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 6:36 [patch 3/4] rndis_wlan: make some variables unsigned Dan Carpenter
2012-03-01 10:19 ` Jussi Kivilinna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox