public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] i2c: new bus driver for efm32
Date: Tue, 25 Mar 2014 10:11:48 +0100	[thread overview]
Message-ID: <20140325091148.GA2570@katana> (raw)
In-Reply-To: <20140325090700.GL23076@pengutronix.de>

On Tue, Mar 25, 2014 at 10:07:00AM +0100, Uwe Kleine-K?nig wrote:
> Hello,
> 
> On Mon, Mar 24, 2014 at 06:01:31PM +0100, Wolfram Sang wrote:
> > And checkpatch said:
> > 
> > WARNING: braces {} are not necessary for any arm of this statement
> > #345: FILE: drivers/i2c/busses/i2c-efm32.c:239:
> > +		if (cur_msg->flags & I2C_M_RD) {
> > ...
> hmm the whole block reads:
> 
>         case REG_STATE_STATE_DATA:
>                 if (cur_msg->flags & I2C_M_RD) {
>                         efm32_i2c_recv_next_byte(ddata);
>                 } else {
>                         /* wait for Ack or Nack of slave */
>                 }
>                 break;
> 
> so just removing the braces does the wrong thing. Is this a false
> positive checkpatch warning? Andy? Joe?
> 
> I can make it:
> 
> 		if (cur_msg->flags & I2C_M_RD)
> 			efm32_i2c_recv_next_byte(ddata);
> 		/* in the write case wait for Ack or Nack of slave */
> 
> but I consider the version above more readable.

Well, OK, I let you decide.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140325/5ba78bba/attachment.sig>

  reply	other threads:[~2014-03-25  9:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 15:03 [PATCH v3] i2c: new bus driver for efm32 Uwe Kleine-König
2014-03-24 17:01 ` Wolfram Sang
2014-03-24 18:41   ` Uwe Kleine-König
2014-03-24 19:08     ` Wolfram Sang
2014-03-25  9:07   ` Uwe Kleine-König
2014-03-25  9:11     ` Wolfram Sang [this message]
     [not found]       ` <CAO=4fJM9y6yML77oJ3uW2Wz=nEhm=xA-bKoMHd8DXdxw0z8p7Q@mail.gmail.com>
2014-03-25 12:00         ` Wolfram Sang
2014-03-25 14:01       ` Joe Perches

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=20140325091148.GA2570@katana \
    --to=wsa@the-dreams.de \
    --cc=linux-arm-kernel@lists.infradead.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