From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Yinbo Zhu <zhuyinbo@loongson.cn>,
Hoan Tran <hoan@os.amperecomputing.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Yang Shen <shenyang39@huawei.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-unisoc@lists.infradead.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH RESEND 09/14] gpio: dwapb: use new generic GPIO chip API
Date: Wed, 3 Sep 2025 17:51:07 +0200 [thread overview]
Message-ID: <aLhj6xsR-NepfRx0@black.igk.intel.com> (raw)
In-Reply-To: <20250825-gpio-mmio-gpio-conv-v1-9-356b4b1d5110@linaro.org>
On Mon, Aug 25, 2025 at 11:48:50AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Convert the driver to using the new generic GPIO chip interfaces from
> linux/gpio/generic.h.
...
> +static inline struct dwapb_gpio *to_dwapb_gpio(struct gpio_chip *gc)
> +{
> + return container_of(to_gpio_generic_chip(gc),
> + struct dwapb_gpio_port, chip)->gpio;
> +}
Since it's not a macro anymore it can be done better:
struct dwapb_gpio_port *port;
port = container_of(to_gpio_generic_chip(gc), struct dwapb_gpio_port, chip);
return port->gpio;
Also, have you checked the bloat-o-meter before and after, wondering if we gain
something with this.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-09-03 15:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-25 9:48 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 01/14] gpio: generic: provide to_gpio_generic_chip() Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 02/14] gpio: generic: provide helpers for reading and writing registers Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 03/14] gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 04/14] gpio: ts4800: remove the unnecessary call to platform_set_drvdata() Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 05/14] gpio: ts4800: use generic device properties Bartosz Golaszewski
2025-09-03 15:41 ` Andy Shevchenko
2025-09-03 16:12 ` Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 06/14] gpio: ts4800: use dev_err_probe() Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 07/14] gpio: ts4800: use new generic GPIO chip API Bartosz Golaszewski
2025-09-03 15:44 ` Andy Shevchenko
2025-09-03 15:48 ` Andy Shevchenko
2025-09-03 16:14 ` Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 08/14] gpio: loongson-64bit: " Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 09/14] gpio: dwapb: " Bartosz Golaszewski
2025-09-03 15:51 ` Andy Shevchenko [this message]
2025-09-03 16:16 ` Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 10/14] gpio: amdpt: " Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 11/14] gpio: rda: " Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 12/14] gpio: grgpio: " Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 13/14] gpio: mpc8xxx: " Bartosz Golaszewski
2025-08-25 9:48 ` [PATCH RESEND 14/14] gpio: ge: " Bartosz Golaszewski
2025-08-25 10:00 ` [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
2025-08-25 10:05 ` Bartosz Golaszewski
-- strict thread matches above, loose matches on Subject: below --
2025-08-12 12:12 Bartosz Golaszewski
2025-08-12 12:12 ` [PATCH RESEND 09/14] gpio: dwapb: use new generic GPIO chip API Bartosz Golaszewski
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=aLhj6xsR-NepfRx0@black.igk.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=hoan@os.amperecomputing.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-unisoc@lists.infradead.org \
--cc=mani@kernel.org \
--cc=shenyang39@huawei.com \
--cc=zhuyinbo@loongson.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®