* Build error in 6.16-rc1 in drivers/mfd/88pm860x-core.c
@ 2025-06-09 1:58 Peter Schneider
2025-06-09 2:31 ` Mario Limonciello
0 siblings, 1 reply; 3+ messages in thread
From: Peter Schneider @ 2025-06-09 1:58 UTC (permalink / raw)
To: LKML, linux-pm
Cc: Linus Torvalds, haojian.zhuang, Mario Limonciello,
mario.limonciello, Thomas Gleixner, jirislaby,
Uwe Kleine-König, Lee Jones, Greg Kroah-Hartman
[-- Attachment #1: Type: text/plain, Size: 2282 bytes --]
Hi all,
I just tried to test-build 6.16-rc1 on my good old 2-socket Ivy Bridge Xeon E5-2697 v2
server, running Proxmox/Debian 12 (Bookworm) with GCC 12.2. I received the following build
error:
CC drivers/mfd/88pm860x-core.o
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;
| ^~~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:287: drivers/mfd/88pm860x-core.o] Error 1
make[3]: *** [scripts/Makefile.build:554: drivers/mfd] Error 2
make[2]: *** [scripts/Makefile.build:554: drivers] Error 2
make[1]: *** [/usr/src/linux/Makefile:2006: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
My config file is attached. I always build with CONFIG_WERROR=y (same as I do in all of my
regular test builds of Greg's stable-RC releases).
I'm not a Kernel developer nor a C programmer, I only have superficial knowledge of C (but
I love to test and to tinker), so I don't quite understand this warning/error message.
Becauses some lines below, the node variable is used as a paramter to the of_fwnode_handle
macro (from include/linux/of.h):
irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, chip->irq_base, 0,
&pm860x_irq_domain_ops, chip);
Does that not count as variable usage to the compiler? Digging in somewhat deeper, I found
that probably the patch from [1] is missing in 6.16 and should have been included?!
When I apply that patch, my build succeeds.
[1]: https://lore.kernel.org/all/20250602201008.1850418-1-superm1@kernel.org/
Beste Grüße,
Peter Schneider
--
Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you. -- David McCullough Jr.
OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244
Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@googlemail.com
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@gmail.com
[-- Attachment #2: .config --]
[-- Type: application/xml, Size: 299301 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Build error in 6.16-rc1 in drivers/mfd/88pm860x-core.c
2025-06-09 1:58 Build error in 6.16-rc1 in drivers/mfd/88pm860x-core.c Peter Schneider
@ 2025-06-09 2:31 ` Mario Limonciello
2025-06-09 2:58 ` Peter Schneider
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2025-06-09 2:31 UTC (permalink / raw)
To: Peter Schneider, LKML, linux-pm
Cc: Linus Torvalds, haojian.zhuang, mario.limonciello,
Thomas Gleixner, jirislaby, Uwe Kleine-König, Lee Jones,
Greg Kroah-Hartman
On 6/8/25 8:58 PM, Peter Schneider wrote:
> Hi all,
>
> I just tried to test-build 6.16-rc1 on my good old 2-socket Ivy Bridge
> Xeon E5-2697 v2 server, running Proxmox/Debian 12 (Bookworm) with GCC
> 12.2. I received the following build error:
>
> CC drivers/mfd/88pm860x-core.o
> 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;
> | ^~~~
> cc1: all warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:287: drivers/mfd/88pm860x-core.o]
> Error 1
> make[3]: *** [scripts/Makefile.build:554: drivers/mfd] Error 2
> make[2]: *** [scripts/Makefile.build:554: drivers] Error 2
> make[1]: *** [/usr/src/linux/Makefile:2006: .] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
>
>
> My config file is attached. I always build with CONFIG_WERROR=y (same as
> I do in all of my regular test builds of Greg's stable-RC releases).
I do too; I'm pretty surprised that that the build robots didn't catch this.
>
> I'm not a Kernel developer nor a C programmer, I only have superficial
> knowledge of C (but I love to test and to tinker), so I don't quite
> understand this warning/error message. Becauses some lines below, the
> node variable is used as a paramter to the of_fwnode_handle macro (from
> include/linux/of.h):
>
> irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, chip-
> >irq_base, 0,
> &pm860x_irq_domain_ops, chip);
>
> Does that not count as variable usage to the compiler?
It's not because there is a macro when CONFIG_OF is not defined that
assigns it as NULL. So to the compiler there is no variable use.
> Digging in
> somewhat deeper, I found that probably the patch from [1] is missing in
> 6.16 and should have been included?!
It was sent during the merge window, it's not a surprise that it wasn't
picked up. I just sent it in case they had a chance to grab it because
not being able to compile with CONFIG_WERROR means other things can more
easily get missed too.
>
> When I apply that patch, my build succeeds.
>
> [1]: https://lore.kernel.org/all/20250602201008.1850418-1-
> superm1@kernel.org/
>
>
> Beste Grüße,
> Peter Schneider
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Build error in 6.16-rc1 in drivers/mfd/88pm860x-core.c
2025-06-09 2:31 ` Mario Limonciello
@ 2025-06-09 2:58 ` Peter Schneider
0 siblings, 0 replies; 3+ messages in thread
From: Peter Schneider @ 2025-06-09 2:58 UTC (permalink / raw)
To: Mario Limonciello, LKML, linux-pm
Cc: Linus Torvalds, haojian.zhuang, mario.limonciello,
Thomas Gleixner, jirislaby, Uwe Kleine-König, Lee Jones,
Greg Kroah-Hartman
Am 09.06.2025 um 04:31 schrieb Mario Limonciello:
>
> On 6/8/25 8:58 PM, Peter Schneider wrote:
>>
>> I'm not a Kernel developer nor a C programmer, I only have superficial knowledge of C
>> (but I love to test and to tinker), so I don't quite understand this warning/error
>> message. Becauses some lines below, the node variable is used as a paramter to the
>> of_fwnode_handle macro (from include/linux/of.h):
>>
>> irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, chip- >irq_base, 0,
>> &pm860x_irq_domain_ops, chip);
>>
>> Does that not count as variable usage to the compiler?
> It's not because there is a macro when CONFIG_OF is not defined that assigns it as NULL.
> So to the compiler there is no variable use.
Ah, thanks for the explanation! I didn't quite see and grasp the nested #ifdefs depending
on CONFIG_OF and the alternate macro definition for of_fwnode_handle when CONFIG_OF is not
set. Now as I do, it makes perfect sense.
Beste Grüße,
Peter Schneider
--
Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you. -- David McCullough Jr.
OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244
Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@googlemail.com
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-09 2:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 1:58 Build error in 6.16-rc1 in drivers/mfd/88pm860x-core.c Peter Schneider
2025-06-09 2:31 ` Mario Limonciello
2025-06-09 2:58 ` Peter Schneider
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox