From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: "Uwe Kleine-König"
<u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Andy Whitcroft <apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [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-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]
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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent 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
[not found] ` <1395414236-22647-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-24 17:01 ` Wolfram Sang
2014-03-24 18:41 ` Uwe Kleine-König
[not found] ` <20140324184114.GK23076-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-24 19:08 ` Wolfram Sang
2014-03-25 9:07 ` Uwe Kleine-König
[not found] ` <20140325090700.GL23076-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-25 9:11 ` Wolfram Sang [this message]
[not found] ` <CAO=4fJM9y6yML77oJ3uW2Wz=nEhm=xA-bKoMHd8DXdxw0z8p7Q@mail.gmail.com>
[not found] ` <CAO=4fJM9y6yML77oJ3uW2Wz=nEhm=xA-bKoMHd8DXdxw0z8p7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
--cc=apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).