Re: [PATCH RESEND 09/14] gpio: dwapb: use new generic GPIO chip API

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




On Mon, Aug 25, 2025 at 11:48:50AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
>
> 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

[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

AltStyle によって変換されたページ (->オリジナル) /