linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 2/2] cfg80211: fix a few -Wshadow warnings
Date: Fri, 20 Jan 2012 13:52:37 +0100	[thread overview]
Message-ID: <20120120125313.111967515@sipsolutions.net> (raw)
In-Reply-To: 20120120125235.243434836@sipsolutions.net

From: Johannes Berg <johannes.berg@intel.com>

It seems that -Wshadow is no longer default in
sparse runs, but let's fix the warnings anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/wireless/nl80211.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/net/wireless/nl80211.c	2012-01-20 13:49:32.000000000 +0100
+++ b/net/wireless/nl80211.c	2012-01-20 13:51:00.000000000 +0100
@@ -427,10 +427,9 @@ static int nl80211_parse_key_new(struct
 
 	if (tb[NL80211_KEY_DEFAULT_TYPES]) {
 		struct nlattr *kdt[NUM_NL80211_KEY_DEFAULT_TYPES];
-		int err = nla_parse_nested(kdt,
-					   NUM_NL80211_KEY_DEFAULT_TYPES - 1,
-					   tb[NL80211_KEY_DEFAULT_TYPES],
-					   nl80211_key_default_policy);
+		err = nla_parse_nested(kdt, NUM_NL80211_KEY_DEFAULT_TYPES - 1,
+				       tb[NL80211_KEY_DEFAULT_TYPES],
+				       nl80211_key_default_policy);
 		if (err)
 			return err;
 
@@ -4781,7 +4780,6 @@ static int nl80211_join_ibss(struct sk_b
 			nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
 		struct ieee80211_supported_band *sband =
 			wiphy->bands[ibss.channel->band];
-		int err;
 
 		err = ieee80211_get_ratemask(sband, rates, n_rates,
 					     &ibss.basic_rates);



      parent reply	other threads:[~2012-01-20 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 12:52 [PATCH 0/2] fix shadow warnings Johannes Berg
2012-01-20 12:52 ` [PATCH 1/2] mac80211: fix a few -Wshadow warnings Johannes Berg
2012-01-20 12:52 ` Johannes Berg [this message]

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=20120120125313.111967515@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --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).