[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b43fea90-2406-4c8a-a499-4da276883a68@kernel.org>
Date: Thu, 22 May 2025 07:57:45 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>, Thomas Gleixner <tglx@...utronix.de>
Cc: Arnd Bergmann <arnd@...db.de>, Lee Jones <lee@...nel.org>,
Aaro Koskinen <aaro.koskinen@....fi>, Andreas Kemnade
<andreas@...nade.info>, Kevin Hilman <khilman@...libre.com>,
Roger Quadros <rogerq@...nel.org>, Tony Lindgren <tony@...mide.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Chen Ni <nichen@...as.ac.cn>, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org
Subject: Re: [PATCH] mfd: fix building without CONFIG_OF
On 20. 05. 25, 17:40, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> Using the of_fwnode_handle() means that local 'node' variables are unused
> whenever CONFIG_OF is disabled for compile testing:
>
> drivers/mfd/88pm860x-core.c: In function 'device_irq_init':
> drivers/mfd/88pm860x-core.c:576:29: error: unused variable 'node' [-Werror=unused-variable]
> 576 | struct device_node *node = i2c->dev.of_node;
> | ^~~~
> drivers/mfd/max8925-core.c: In function 'max8925_irq_init':
> drivers/mfd/max8925-core.c:659:29: error: unused variable 'node' [-Werror=unused-variable]
> 659 | struct device_node *node = chip->dev->of_node;
> | ^~~~
> drivers/mfd/twl4030-irq.c: In function 'twl4030_init_irq':
> drivers/mfd/twl4030-irq.c:679:46: error: unused variable 'node' [-Werror=unused-variable]
> 679 | struct device_node *node = dev->of_node;
> | ^~~~
>
> Replace these with the corresponding dev_fwnode() lookups that
> keep the code simpler in addition to avoiding the warnings.
Reviewed-by: Jiri Slaby <jirislaby@...nel.org>
Exactly the same as I have, except:
...
> --- a/drivers/mfd/max8925-core.c
> +++ b/drivers/mfd/max8925-core.c
> @@ -682,8 +681,9 @@ static int max8925_irq_init(struct max8925_chip *chip, int irq,
> return -EBUSY;
> }
>
> - irq_domain_create_legacy(of_fwnode_handle(node), MAX8925_NR_IRQS, chip->irq_base, 0,
> - &max8925_irq_domain_ops, chip);
> + irq_domain_create_legacy(dev_fwnode(chip->dev), MAX8925_NR_IRQS,
> + chip->irq_base, 0, &max8925_irq_domain_ops,
> + chip);
I used 100 columns -- without actually adding a line break and reflowing.
thanks,
--
js
suse labs
Powered by blists - more mailing lists