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


Groups > linux.kernel > #1712504

Re: [PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode switch

From Darren Hart <dvhart@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode switch
Date 2017-08-16 00:50 +0200
Message-ID <ueSOR-7jm-5@gated-at.bofh.it> (permalink)
References <ueonM-5bN-23@gated-at.bofh.it> <uepDb-5Rt-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 14, 2017 at 06:32:48PM +0300, Andy Shevchenko wrote:
> On Mon, Aug 14, 2017 at 5:17 PM, Hao Wei Tee <angelsl@in04.sg> wrote:
> > +static int method_gbmd(acpi_handle handle, unsigned long *ret)
> > +{
> > +       int val;
> > +       int result = read_method_int(handle, "GBMD", &val);
> 
> Reversed X-mas tree order in new code, please.

Generally yes, but of here they are using &val in the second initializer.

So either as is or:

int result;
int val;

result = read_method_int(handle, "GBMD", &val)

I tend to accept it as is when there is a declaration order dependency like
this.

-- 
Darren Hart
VMware Open Source Technology Center

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


Thread

[PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode  switch Hao Wei Tee <angelsl@in04.sg> - 2017-08-14 16:20 +0200
  Re: [PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode switch Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-14 17:40 +0200
    Re: [PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode  switch Hao Wei Tee <angelsl@in04.sg> - 2017-08-14 18:00 +0200
    Re: [PATCH v2] platform/x86: ideapad-laptop: Expose conservation  mode switch Darren Hart <dvhart@infradead.org> - 2017-08-16 00:50 +0200
      Re: [PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode switch Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-18 14:50 +0200
  [PATCH v3] platform/x86: ideapad-laptop: Expose conservation mode  switch Hao Wei Tee <angelsl@in04.sg> - 2017-08-14 18:20 +0200
    Re: [PATCH v3] platform/x86: ideapad-laptop: Expose conservation mode switch Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-14 22:40 +0200

csiph-web