Re: [PATCH 1/2] gpiolib: drop tabs from local variable declarations

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

 



On Tue, Dec 19, 2023 at 4:06 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Tue, Dec 19, 2023 at 03:23:22PM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> >
> > Older code has an annoying habit of putting tabs between the type and the
> > name of the variable. This doesn't really add to readability and newer
> > code doesn't do it so make the entire file consistent.
> >
> > While at it: convert 'unsigned' to 'unsigned int'.
>
> Not a big change to be a burden for backporting I suppose.
> Code wise looks good to me,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> ...
>
> > +     struct gpio_chip *gc = desc->gdev->chip;
> > +     int ret;
> > +     unsigned long flags;
> > +     unsigned int offset;
>
> I'm wondering if you can make it reversed xmas tree order.
> This will make it even more consistent between functions.
>

Sure but we'd have to update all functions across gpiolib.c. Let's
take it one thing at a time.

Bart

> ...
>
> > +     bool ret = false;
> > +     unsigned long flags;
> > +     struct gpio_chip *gc;
>
> Ditto.
>
> ...
>
> > +     struct gpio_chip *gc = gdev->chip;
> > +     struct gpio_desc *desc;
>
> (okay with above, but...)
>
> > +     unsigned int gpio = gdev->base;
>
> > +     int value;
>
> Ditto.
>
> > +     bool is_out;
> > +     bool is_irq;
> > +     bool active_low;
>
> And ditto.
>
> --
> 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