Re: [PATCH] mfd: Remove node variables that are unused with CONFIG_OF=n

From: Lee Jones
Date: Fri Jun 13 2025 - 09:39:19 EST


On Wed, 28 May 2025, Nathan Chancellor wrote:

> Hi Thomas,
>
> On Thu, May 08, 2025 at 04:57:24PM +0100, Nathan Chancellor wrote:
> > A recent cleanup introduced a few instances of -Wunused-variable in
> > configurations without CONFIG_OF because of_fwnode_handle() does not
> > reference its argument in that case:
> >
> > drivers/mfd/twl4030-irq.c: In function 'twl4030_init_irq':
> > drivers/mfd/twl4030-irq.c:679:46: warning: unused variable 'node' [-Wunused-variable]
> > 679 | struct device_node *node = dev->of_node;
> > | ^~~~
> > drivers/mfd/max8925-core.c: In function 'max8925_irq_init':
> > drivers/mfd/max8925-core.c:659:29: warning: unused variable 'node' [-Wunused-variable]
> > 659 | struct device_node *node = chip->dev->of_node;
> > | ^~~~
> > drivers/mfd/88pm860x-core.c: In function 'device_irq_init':
> > drivers/mfd/88pm860x-core.c:576:29: warning: unused variable 'node' [-Wunused-variable]
> > 576 | struct device_node *node = i2c->dev.of_node;
> > | ^~~~
>
> These warnings are now present in mainline after the merge of the
> irq/cleanups branch...
>
> > Use the value of these variables as the argument to of_fwnode_handle()
> > directly, clearing up the warnings.
> >
> > Fixes: e3d44f11da04 ("mfd: Switch to irq_domain_create_*()")
>
> but this hash has changed, so this should be
>
> Fixes: a36aa0f7226a ("mfd: Switch to irq_domain_create_*()")
>
> but the rest of the change is still applicable. Would you like a new
> change or can you adjust that when applying?

Okay, please rebase and resubmit.

I suspect at least one of these has been fixed by Arnd already.

--
Lee Jones [李琼斯]