From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Mark Brown <broonie@kernel.org>
Cc: Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: pxa2xx: Mark expected switch fall-through
Date: Wed, 3 Oct 2018 17:53:38 +0200 [thread overview]
Message-ID: <64472b50-f00d-e22c-5dff-aa290c6559c5@embeddedor.com> (raw)
In-Reply-To: <22e7d33d-db33-d2e4-30b1-fa87176e4277@embeddedor.com>
On 10/3/18 5:27 PM, Gustavo A. R. Silva wrote:
>
>
> On 10/3/18 5:22 PM, Mark Brown wrote:
>> On Wed, Oct 03, 2018 at 02:12:11PM +0200, Gustavo A. R. Silva wrote:
>>
>>> switch (drv_data->n_bytes) {
>>> case 4:
>>> bytes_left >>= 1;
>>> + /* Fall through */
>>> case 2:
>>> bytes_left >>= 1;
>>> }
>>
>> I think this code is just being too cute and it'd be better to just
>> rewrite it to directly do the expected number of shifts directly in each
>> case and have break statements; your fix is good but still not ideal for
>> readability I think.
>>
>
> Okay. I agree. I'll rewrite and send v2.
>
I'll actually send a completely new patch for this.
Thanks
--
Gustavo
prev parent reply other threads:[~2018-10-03 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 12:12 [PATCH] spi: pxa2xx: Mark expected switch fall-through Gustavo A. R. Silva
2018-10-03 15:22 ` Mark Brown
2018-10-03 15:27 ` Gustavo A. R. Silva
2018-10-03 15:53 ` 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=64472b50-f00d-e22c-5dff-aa290c6559c5@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/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).