Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1557267

Re: [PATCH] i2c: piix4: Avoid race conditions with IMC

From Wolfram Sang <wsa@the-dreams.de>
Newsgroups linux.kernel
Subject Re: [PATCH] i2c: piix4: Avoid race conditions with IMC
Date 2017-01-12 11:10 +0100
Message-ID <sYKut-2GC-1@gated-at.bofh.it> (permalink)
References <sY3zc-1dQ-33@gated-at.bofh.it> <sYgd4-tK-17@gated-at.bofh.it> <sYKb7-2kU-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

> > > +       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.

Not really. Some say "Reorder to save bytes", some say "reorder to
utilize cache lines most". Unless I get some numbers showing the desired
effect, I go for "most readable" approach which is subjective, of
course. I'd be totally fine with the above.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] i2c: piix4: Avoid race conditions with IMC Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2017-01-10 13:20 +0100
  Re: [PATCH] i2c: piix4: Avoid race conditions with IMC Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-11 02:50 +0100
    Re: [PATCH] i2c: piix4: Avoid race conditions with IMC Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2017-01-11 10:20 +0100
    Re: [PATCH] i2c: piix4: Avoid race conditions with IMC Jean Delvare <jdelvare@suse.de> - 2017-01-12 10:50 +0100
      Re: [PATCH] i2c: piix4: Avoid race conditions with IMC Wolfram Sang <wsa@the-dreams.de> - 2017-01-12 11:10 +0100
        Re: [PATCH] i2c: piix4: Avoid race conditions with IMC Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-12 21:10 +0100

csiph-web