Re: [PATCH v2 04/11] gpio: Ensure struct gpio_chip for gpiochip_setup_dev()

From: Tzung-Bi Shih

Date: Thu Feb 05 2026 - 03:53:54 EST


On Wed, Feb 04, 2026 at 04:36:00AM -0600, Bartosz Golaszewski wrote:
> On Tue, 3 Feb 2026 07:10:51 +0100, Tzung-Bi Shih <tzungbi@xxxxxxxxxx> said:
> > Ensure struct gpio_chip for gpiochip_setup_dev(). This eliminates a few
> > checks for struct gpio_chip.
> >
> > Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
>
> Same comment as patch 3. I don't like seeing both gpio_chip and gpio_device
> being passed to the same function. If you already dereferenced gpio_chip, pass
> it on its own and get the address of the associated devices from its member
> pointer.

Ack, will fix in the next version.