lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VfOA4trC61WTcfccBJFk8kjWt+dZ16vfBOijzO-tE0UfA@mail.gmail.com>
Date:   Wed, 27 Sep 2017 11:58:02 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Darren Hart <dvhart@...radead.org>
Cc:     Jérôme de Bretagne 
        <jerome.debretagne@...il.com>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux ACPI <linux-acpi@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Mario Limonciello <mario.limonciello@...l.com>,
        Alex Hung <alex.hung@...onical.com>
Subject: Re: [PATCH] platform/x86: intel-hid: Power button suspend on Dell
 Latitude 7275

On Wed, Sep 27, 2017 at 10:31 AM, Darren Hart <dvhart@...radead.org> wrote:
> 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@...radead.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 :-)

Good we are on the same page WRT such pattern.


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ