From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Kent Gibson <warthog618@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 1/2] gpiolib: drop tabs from local variable declarations
Date: Tue, 19 Dec 2023 17:06:33 +0200 [thread overview]
Message-ID: <ZYGxefhI9UpwknhD@smile.fi.intel.com> (raw)
In-Reply-To: <20231219142323.28929-1-brgl@bgdev.pl>
On Tue, Dec 19, 2023 at 03:23:22PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> 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@linux.intel.com>
...
> + 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.
...
> + 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
next prev parent reply other threads:[~2023-12-19 15:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 14:23 [PATCH 1/2] gpiolib: drop tabs from local variable declarations Bartosz Golaszewski
2023-12-19 14:23 ` [PATCH 2/2] gpio: sysfs: " Bartosz Golaszewski
2023-12-19 15:07 ` Andy Shevchenko
2023-12-19 20:06 ` Bartosz Golaszewski
2023-12-19 15:06 ` Andy Shevchenko [this message]
2023-12-19 19:59 ` [PATCH 1/2] gpiolib: " Bartosz Golaszewski
2023-12-20 14:09 ` 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=ZYGxefhI9UpwknhD@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=warthog618@gmail.com \
/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.