Re: [PATCH v5 04/17] gpiolib: Add temporary variable to gpiod_set_transitory() for cleaner code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 11, 2020 at 5:33 PM Mika Westerberg
<mika.westerberg@xxxxxxxxxxxxxxx> wrote:
>
> On Mon, Nov 09, 2020 at 10:53:19PM +0200, Andy Shevchenko wrote:
> > Temporary variable that keeps mode allows to neat the code a bit.
> > It will also help for the future changes.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> Not really sure if this is good change or not. Instead of constant you
> now introduce a useless variable just to get them to the same line.

No, it's useful in a patch in the series as promised in the commit
message. That variable reduces a line length a lot there.

> To me this looks better and reads easier:
>
>         packed = pinconf_to_config_packed(PIN_CONFIG_PERSIST_STATE, !transitory);
>
> But not insisting so if GPIO maintainers are fine then no objections :)

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux