public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
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 16:22:55 +0100	[thread overview]
Message-ID: <20181003152255.GE7132@sirena.org.uk> (raw)
In-Reply-To: <20181003121211.GA28108@embeddedor.com>

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-10-03 15:23 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 [this message]
2018-10-03 15:27   ` Gustavo A. R. Silva
2018-10-03 15:53     ` 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=20181003152255.GE7132@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=gustavo@embeddedor.com \
    --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