Skip to contentSkip to conversation

Extcon build failure in next

DISCUSSION Tony Lindgren 4 participants 8 messages Jun 30, 2016 – Aug 4, 2016

lore
Share & tools
lore
#0 lore raw

Hi Chanwoo,

Looks like current Linux next fails to build with at least omap2plus_defconfig because of:

ERROR: "extcon_dev_allocate" [drivers/extcon/devres.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1163: recipe for target 'modules' failed
make: *** [modules] Error 2
Kernel build failed

Probably extcon_dev_allocate just needs EXPORT_SYMBOL_GPL?

Regards,

Tony

#1 lore raw
Quoted 5 lines · Tony Lindgren

Hi Chanwoo,

Looks like current Linux next fails to build with at least omap2plus_defconfig because of:

Quoted 8 lines

ERROR: "extcon_dev_allocate" [drivers/extcon/devres.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1163: recipe for target 'modules' failed
make: *** [modules] Error 2
Kernel build failed

Probably extcon_dev_allocate just needs EXPORT_SYMBOL_GPL?

Also I'm seeing:

drivers/extcon/extcon.c: In function 'extcon_register_notifier':
drivers/extcon/extcon.c:455:6: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]

   if (idx >= 0) {
         ^

Regards,

Tony

#2 lore raw
Quoted 6 lines · CEST Tony Lindgren
Quoted 5 lines · Tony Lindgren

Hi Chanwoo,

Looks like current Linux next fails to build with at least omap2plus_defconfig because of:

Quoted 8 lines
Quoted 8 lines

ERROR: "extcon_dev_allocate" [drivers/extcon/devres.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1163: recipe for target 'modules' failed
make: *** [modules] Error 2
Kernel build failed

Probably extcon_dev_allocate just needs EXPORT_SYMBOL_GPL?

I've sent "extcon: link devres into core module" for this

Quoted 6 lines

Also I'm seeing:

drivers/extcon/extcon.c: In function 'extcon_register_notifier':
drivers/extcon/extcon.c:455:6: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]

   if (idx >= 0) {
         ^

I don't see this one. Which compiler version do you use?

Arnd

#3 lore raw
Quoted 14 lines · Arnd Bergmann
Quoted 13 lines · CEST Tony Lindgren
Quoted 12 lines · Tony Lindgren

Hi Chanwoo,

Looks like current Linux next fails to build with at least omap2plus_defconfig because of:

ERROR: "extcon_dev_allocate" [drivers/extcon/devres.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1163: recipe for target 'modules' failed
make: *** [modules] Error 2
Kernel build failed

Quoted 3 lines
Quoted 1 line
Quoted 1 line

Probably extcon_dev_allocate just needs EXPORT_SYMBOL_GPL?

I've sent "extcon: link devres into core module" for this

OK thanks.

Quoted 8 lines
Quoted 6 lines

Also I'm seeing:

drivers/extcon/extcon.c: In function 'extcon_register_notifier':
drivers/extcon/extcon.c:455:6: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]

   if (idx >= 0) {
         ^

I don't see this one. Which compiler version do you use?

Looks like I'm currently using older arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2014.05-29) 4.8.3 20140320 (prerelease). I think the Debian compiler was not working few months ago and I changed to something I had around.

Looks like the warning does not appear with arm-linux-gnueabihf-gcc (Debian 6.1.1-3) 6.1.1 20160511.

Regards,

Tony

#4 lore raw
Quoted 9 lines · CEST Tony Lindgren
Quoted 8 lines
Quoted 6 lines

Also I'm seeing:

drivers/extcon/extcon.c: In function 'extcon_register_notifier':
drivers/extcon/extcon.c:455:6: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]

   if (idx >= 0) {
         ^

I don't see this one. Which compiler version do you use?

Quoted 7 lines

Looks like I'm currently using older arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2014.05-29) 4.8.3 20140320 (prerelease). I think the Debian compiler was not working few months ago and I changed to something I had around.

Looks like the warning does not appear with arm-linux-gnueabihf-gcc (Debian 6.1.1-3) 6.1.1 20160511.

You are certainly not the only one using gcc-4.7 or gcc-4.8, but they are known to produce more false postive -Wmaybe-uninitialized warnings and 4.9 or higher. I usually send patches for these warnings when gcc-6 finds them, and I have recently sent patches for all the warnings I got in allmodconfig with 4.9, but have no plans to do that for the older compilers.

I wonder whether we should just disable this warning with gcc-4.8 by adding $(call cc-ifversion, -eq, 0408, -Wno-maybe-uninitialized) to the command line. However, gcc-4.7 does not let you turn off the warning at all, so the use of that is fairly limited.

Arnd

#5 lore raw
Quoted 18 lines · Arnd Bergmann
Quoted 9 lines · CEST Tony Lindgren
Quoted 8 lines
Quoted 6 lines

Also I'm seeing:

drivers/extcon/extcon.c: In function 'extcon_register_notifier':
drivers/extcon/extcon.c:455:6: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]

   if (idx >= 0) {
         ^

I don't see this one. Which compiler version do you use?

Quoted 7 lines

Looks like I'm currently using older arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2014.05-29) 4.8.3 20140320 (prerelease). I think the Debian compiler was not working few months ago and I changed to something I had around.

Looks like the warning does not appear with arm-linux-gnueabihf-gcc (Debian 6.1.1-3) 6.1.1 20160511.

Quoted 6 lines

You are certainly not the only one using gcc-4.7 or gcc-4.8, but they are known to produce more false postive -Wmaybe-uninitialized warnings and 4.9 or higher. I usually send patches for these warnings when gcc-6 finds them, and I have recently sent patches for all the warnings I got in allmodconfig with 4.9, but have no plans to do that for the older compilers.

OK thanks for the information, I'll change back to something newer here again.

Quoted 4 lines

I wonder whether we should just disable this warning with gcc-4.8 by adding $(call cc-ifversion, -eq, 0408, -Wno-maybe-uninitialized) to the command line. However, gcc-4.7 does not let you turn off the warning at all, so the use of that is fairly limited.

That probably disables warnings also for real warnings too then :)

Tony

#6 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann
Quoted 7 lines · CEST Tony Lindgren

* Tony Lindgren <[email protected]> [160629 22:41]:
Also I'm seeing:

drivers/extcon/extcon.c: In function 'extcon_register_notifier':
drivers/extcon/extcon.c:455:6: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]

   if (idx >= 0) {
         ^

I don't see this one. Which compiler version do you use?

Also seen with m68k-linux-gnu-gcc-4.1 in current mainline (fix claimed to be applied).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#7 lore raw
In reply to Tony Lindgren

Hi Tony,

Quoted 13 lines · Tony Lindgren
Quoted 12 lines · Tony Lindgren

Hi Chanwoo,

Looks like current Linux next fails to build with at least omap2plus_defconfig because of:

ERROR: "extcon_dev_allocate" [drivers/extcon/devres.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1163: recipe for target 'modules' failed
make: *** [modules] Error 2
Kernel build failed

Quoted 7 lines
Quoted 1 line

Probably extcon_dev_allocate just needs EXPORT_SYMBOL_GPL?

Also I'm seeing:

drivers/extcon/extcon.c: In function 'extcon_register_notifier':
drivers/extcon/extcon.c:455:6: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (idx >= 0) {

This issue is already fixed on patch[1] and merged it.
[1] https://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-next

Regards,
Chanwoo Choi