Re: [PATCH] gpio: swnode: remove deprecated lookup mechanism

From: Andy Shevchenko

Date: Mon Jun 29 2026 - 10:48:20 EST


On Mon, Jun 29, 2026 at 07:04:43AM -0700, Bartosz Golaszewski wrote:
> On Mon, 29 Jun 2026 15:10:40 +0200, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxx> said:
> > On Mon, Jun 29, 2026 at 12:54:58PM +0200, Bartosz Golaszewski wrote:

...

> >> fwnode_lookup:
> >> - gdev = gpio_device_find_by_fwnode(fwnode);
> >
> >> - return gdev ?: ERR_PTR(-EPROBE_DEFER);
> >
> > Can we simply leave these two instead?
>
> Honestly, that's just personal preference. I prefer the oneliner.

I was under impression that gdev variable has use after this, but LKP showed
that you missed its removal. With that in mind, I have no objections against
oneliner.

--
With Best Regards,
Andy Shevchenko