From: Johannes Berg <johannes@sipsolutions.net>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
"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: Fri, 06 Jul 2018 14:29:24 +0200 [thread overview]
Message-ID: <1530880164.3197.38.camel@sipsolutions.net> (raw)
In-Reply-To: <20180704210553.GA7869@embeddedor.com>
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?
> 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:"
johannes
next prev parent reply other threads:[~2018-07-06 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 21:05 [PATCH] wireless: mark expected switch fall-throughs Gustavo A. R. Silva
2018-07-06 12:29 ` Johannes Berg [this message]
2018-10-23 0:07 ` Gustavo A. R. Silva
2018-10-23 0:07 ` Gustavo A. R. Silva
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=1530880164.3197.38.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=gustavo@embeddedor.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.