From: Darren Hart <dvhart@infradead.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Hao Wei Tee <angelsl@in04.sg>,
Platform Driver <platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andy Shevchenko <andy@infradead.org>,
Ike Panhc <ike.pan@canonical.com>
Subject: Re: [PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode switch
Date: Tue, 15 Aug 2017 15:42:50 -0700 [thread overview]
Message-ID: <20170815224250.GA28337@fury> (raw)
In-Reply-To: <CAHp75Vc8r0YWUZ77+nFmwn5_Yz7XqhJ5C+qRcjemmtmK+=YXXA@mail.gmail.com>
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
next prev parent reply other threads:[~2017-08-15 22:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 14:17 [PATCH v2] platform/x86: ideapad-laptop: Expose conservation mode switch Hao Wei Tee
2017-08-14 15:32 ` Andy Shevchenko
2017-08-14 15:51 ` Hao Wei Tee
2017-08-15 22:42 ` Darren Hart [this message]
2017-08-18 12:46 ` Andy Shevchenko
2017-08-14 16:13 ` [PATCH v3] " Hao Wei Tee
2017-08-14 20:30 ` 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=20170815224250.GA28337@fury \
--to=dvhart@infradead.org \
--cc=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=angelsl@in04.sg \
--cc=ike.pan@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.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