Re: [PATCH v1 1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode

From: Andy Shevchenko
Date: Thu Nov 10 2022 - 08:56:54 EST


On Wed, Nov 09, 2022 at 01:19:30PM -0800, Dmitry Torokhov wrote:
> On Wed, Nov 09, 2022 at 05:07:33PM +0200, Andy Shevchenko wrote:

...

> > - of_node_put(mm_gc->gc.of_node);
> > - mm_gc->gc.of_node = of_node_get(np);
> > + fwnode_handle_put(mm_gc->gc.fwnode);
> > + mm_gc->gc.fwnode = fwnode_handle_get(fwnode);
>
> Can we reduce the patch to
>
> fwnode_handle_put(mm_gc->gc.fwnode);
> mm_gc->gc.fwnode = fwnode_handle_get(of_fwnode_handle(np));
>
> ?

Sure. As Linus pointed out, it's anyway temporary.

> I do not see a reason for converting the rest of invocations to fwnode
> given that this is clearly an OF API.

...which should go away.

--
With Best Regards,
Andy Shevchenko