From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Johannes Berg <johannes@sipsolutions.net>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wireless: mark expected switch fall-throughs
Date: Tue, 23 Oct 2018 02:07:12 +0200 [thread overview]
Message-ID: <3d764be1-cf8e-b1f0-1f4d-765ca3435174@embeddedor.com> (raw)
In-Reply-To: <1530880164.3197.38.camel@sipsolutions.net>
On 7/6/18 2:29 PM, Johannes Berg wrote:
> Hi Gustavo,
>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>
> You dropped the remark saying you didn't review them, but did you?
>
I'll add it in v2.
>> case NL80211_CHAN_WIDTH_20:
>> if (!ht_cap->ht_supported)
>> return false;
>> + /* else: fall through */
>
> What's the point in else:?
>
> We also don't necessarily write
>
> if (!...)
> return false;
> else
> do_something();
>
> but rather
>
> if (!...)
> return false;
> do_something().
>
> I think I'd prefer without the "else:"
>
Sure thing. I'll change this in v2.
I'll send v2 shortly.
Thanks for the feedback.
--
Gustavo
prev parent reply other threads:[~2018-10-23 0:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 21:05 Gustavo A. R. Silva
2018-07-06 12:29 ` Johannes Berg
2018-10-23 0:07 ` Gustavo A. R. Silva [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=3d764be1-cf8e-b1f0-1f4d-765ca3435174@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@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
all inboxes | Powered by JetHome®