From: Alex Elder <elder@linaro.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Alex Elder <elder@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org,
Johan Hovold <johan@kernel.org>
Subject: Re: [greybus-dev] [PATCH][next] greybus: Use fallthrough pseudo-keyword
Date: Wed, 29 Jul 2020 07:15:12 -0500 [thread overview]
Message-ID: <e45f807e-dc35-b335-fca0-424d56e05f09@linaro.org> (raw)
In-Reply-To: <20200729105157.6acksxuzjdno5omq@vireshk-mac-ubuntu>
On 7/29/20 5:51 AM, Viresh Kumar wrote:
> On 28-07-20, 17:37, Alex Elder wrote:
>> On 7/27/20 1:32 PM, Gustavo A. R. Silva wrote:
>>> Replace the existing /* fall through */ comments and its variants with
>>> the new pseudo-keyword macro fallthrough[1].
>>>
>>> [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
>>
>> Thanks for the patch. It looks good, but it raises
>> another question I'd like discussion on.
>>
>> It seems that Johan likes default (or final) cases in
>> switch statements without a "break" statement. Viresh
>> and Bryan appear to be fond of this too.
>>
>> It's pedantic, but I don't like that. Am I wrong?
>> --> Johan/Viresh/Bryan would you please comment?
>
> I am not fond of them as they aren't required for the working of the code. It is
> a bit like using an empty return statement for a routine with void return type,
> though it surely adds some consistency to the switch case.
I understand this perspective, and it's exactly why I wanted
to have a conversation about it (rather than just saying it
should be fixed). As similar example, I don't like unnecessary
parentheses, but sometimes it's a good idea to have them.
Thanks.
-Alex
> But if people really feel it must be there, then its fine :)
>
next prev parent reply other threads:[~2020-07-29 12:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 18:32 Gustavo A. R. Silva
2020-07-28 22:37 ` Alex Elder
2020-07-29 0:25 ` Joe Perches
2020-07-29 10:51 ` [greybus-dev] " Viresh Kumar
2020-07-29 12:15 ` Alex Elder [this message]
2020-08-05 13:14 ` Alex Elder
2020-08-05 16:21 ` Johan Hovold
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=e45f807e-dc35-b335-fca0-424d56e05f09@linaro.org \
--to=elder@linaro.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=gustavoars@kernel.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@linaro.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®