From: Johannes Berg <johannes@sipsolutions.net>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: Remove compile warnings
Date: Thu, 03 May 2012 21:00:17 +0200 [thread overview]
Message-ID: <1336071617.5167.9.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1335357955-28089-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> (sfid-20120425_144514_783980_CE23A8CA)
On Wed, 2012-04-25 at 15:45 +0300, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Use default key to handle similar iface types. This removes compile warnings:
>
> net/wireless/util.c: In function ‘cfg80211_change_iface’:
> net/wireless/util.c:846:3: warning: enumeration value ‘NL80211_IFTYPE_MAX’
> not handled in switch [-Wswitch]
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> net/wireless/util.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/wireless/util.c b/net/wireless/util.c
> index 1b7a08d..468dc8b 100644
> --- a/net/wireless/util.c
> +++ b/net/wireless/util.c
> @@ -862,8 +862,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
> case NL80211_IFTYPE_MONITOR:
> /* monitor can't bridge anyway */
> break;
> - case NL80211_IFTYPE_UNSPECIFIED:
> - case NUM_NL80211_IFTYPES:
> + default:
When did this warning start occurring? I was pretty sure it didn't use
to? I think we should explicitly list the cases here though because we
want the compiler to warn here when we add something to the interface
type list so we catch this place that may have to be modified.
johannes
next prev parent reply other threads:[~2012-05-03 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 12:45 [PATCH] cfg80211: Remove compile warnings Andrei Emeltchenko
2012-05-03 19:00 ` Johannes Berg [this message]
2012-05-04 8:44 ` Andrei Emeltchenko
2012-05-07 9:30 ` Johannes Berg
2012-05-09 1:48 ` John W. Linville
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=1336071617.5167.9.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Andrei.Emeltchenko.news@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).