From: Jean Delvare <jdelvare@suse.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: piix4: Avoid race conditions with IMC
Date: Thu, 12 Jan 2017 10:40:06 +0100 [thread overview]
Message-ID: <20170112104006.4dfed9b7@endymion> (raw)
In-Reply-To: <CAHp75VdnoW84sQh-vf57NSC6_tXGqvb_36KCPpi-XFbktWiKfw@mail.gmail.com>
On Wed, 11 Jan 2017 03:49:21 +0200, Andy Shevchenko wrote:
> On Tue, Jan 10, 2017 at 2:16 PM, Ricardo Ribalda Delgado
> > --- a/drivers/i2c/busses/i2c-piix4.c
> > +++ b/drivers/i2c/busses/i2c-piix4.c
> > @@ -585,9 +585,28 @@ static s32 piix4_access_sb800(struct i2c_adapter *adap, u16 addr,
> > u8 command, int size, union i2c_smbus_data *data)
> > {
> > struct i2c_piix4_adapdata *adapdata = i2c_get_adapdata(adap);
> > + unsigned short piix4_smba = adapdata->smba;
> > u8 smba_en_lo;
> > u8 port;
> > int retval;
> > + int timeout = 0;
> > + int smbslvcnt;
>
> Keep them just after your another added variable.
FWIW, I don't think this makes sense as a general rule. I'd rather have
the variables in an order which makes sense (for human readers or for
stack size optimization - unless gcc does it for us?), rather than
always adding at the same place. Is there a rationale for doing that? I
don't think shrinking the patch size is good enough a reason.
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2017-01-12 9:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-10 12:16 [PATCH] i2c: piix4: Avoid race conditions with IMC Ricardo Ribalda Delgado
2017-01-11 1:49 ` Andy Shevchenko
2017-01-11 9:11 ` Ricardo Ribalda Delgado
2017-01-12 9:40 ` Jean Delvare [this message]
2017-01-12 10:00 ` Wolfram Sang
2017-01-12 19:37 ` Andy Shevchenko
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=20170112104006.4dfed9b7@endymion \
--to=jdelvare@suse.de \
--cc=andy.shevchenko@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ricardo.ribalda@gmail.com \
--cc=wsa@the-dreams.de \
/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).