All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Jérôme de Bretagne" <jerome.debretagne@gmail.com>,
	"Platform Driver" <platform-driver-x86@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linux ACPI" <linux-acpi@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Mario Limonciello" <mario.limonciello@dell.com>,
	"Alex Hung" <alex.hung@canonical.com>
Subject: Re: [PATCH] platform/x86: intel-hid: Power button suspend on Dell Latitude 7275
Date: Wed, 27 Sep 2017 00:31:41 -0700	[thread overview]
Message-ID: <20170927073141.GB19973@fury> (raw)
In-Reply-To: <CAHp75VdJXmif+pesu=EAJ5i9dWtaNLXr3QGJdQZiKp_tURtGYg@mail.gmail.com>

On Mon, Sep 25, 2017 at 01:57:48PM +0300, Andy Shevchenko wrote:
> On Sat, Sep 23, 2017 at 2:45 AM, Darren Hart <dvhart@infradead.org> wrote:
> > On Mon, Sep 18, 2017 at 12:57:12AM +0200, Jérôme de Bretagne wrote:
> 
> >> +             if (event == 0xce) {
> >> +                     input_report_key(priv->input_dev, KEY_POWER, 1);
> >> +                     input_sync(priv->input_dev);
> >> +                     return;
> >> +             } else if (event == 0xcf)
> >> +                     return;
> >
> > Minor CodingStyle nit. If the if block uses parens, so does the else block. In
> > this case, since the if returns, just skip the else entirely.
> >
> > See Documentation/process/coding-style.rst
> > The example immediatley *before* 3.1) Spaces.
> >
> > I've made this change and queued for testing.
> >
> >> +     }
> 
> Actually in this case even 'else' is redundant.

Yes, this is what I meant above by "skip the else entirely", and is the
change I made prior to committing. I was just pointing out the coding
style at the same time :-)

-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2017-09-27  7:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 22:57 [PATCH] platform/x86: intel-hid: Power button suspend on Dell Latitude 7275 Jérôme de Bretagne
2017-09-18 21:29 ` Mario.Limonciello
2017-09-18 21:29   ` Mario.Limonciello
2017-09-18 22:40   ` Jérôme de Bretagne
2017-09-20 20:07     ` Mario.Limonciello
2017-09-20 20:07       ` Mario.Limonciello
2017-09-22 23:45 ` Darren Hart
2017-09-25 10:57   ` Andy Shevchenko
2017-09-27  7:31     ` Darren Hart [this message]
2017-09-27  8:58       ` 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=20170927073141.GB19973@fury \
    --to=dvhart@infradead.org \
    --cc=alex.hung@canonical.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=jerome.debretagne@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@dell.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.