* [PATCH] MIPS: JZ4740: fixup #include's (sparse) @ 2014-12-18 2:39 Brian Norris 2014-12-18 13:02 ` Ralf Baechle 2014-12-18 15:29 ` Lars-Peter Clausen 0 siblings, 2 replies; 6+ messages in thread From: Brian Norris @ 2014-12-18 2:39 UTC (permalink / raw) To: Ralf Baechle; +Cc: linux-mips, Brian Norris Fixes sparse warnings: arch/mips/jz4740/irq.c:63:6: warning: symbol 'jz4740_irq_suspend' was not declared. Should it be static? arch/mips/jz4740/irq.c:69:6: warning: symbol 'jz4740_irq_resume' was not declared. Should it be static? Also, I've seen some elusive build errors on my automated build test where JZ4740_IRQ_BASE and NR_IRQS are missing, but I can't reproduce them manually for some reason. Anyway, mach-jz4740/irq.h should help us avoid relying on some implicit include. Signed-off-by: Brian Norris <computersforpeace@gmail.com> --- arch/mips/jz4740/irq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index 2531da1d3add..97206b3deb97 100644 --- a/arch/mips/jz4740/irq.c +++ b/arch/mips/jz4740/irq.c @@ -30,6 +30,9 @@ #include <asm/irq_cpu.h> #include <asm/mach-jz4740/base.h> +#include <asm/mach-jz4740/irq.h> + +#include "irq.h" static void __iomem *jz_intc_base; -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] MIPS: JZ4740: fixup #include's (sparse) 2014-12-18 2:39 [PATCH] MIPS: JZ4740: fixup #include's (sparse) Brian Norris @ 2014-12-18 13:02 ` Ralf Baechle 2014-12-18 14:44 ` Ralf Baechle 2014-12-18 17:15 ` Brian Norris 2014-12-18 15:29 ` Lars-Peter Clausen 1 sibling, 2 replies; 6+ messages in thread From: Ralf Baechle @ 2014-12-18 13:02 UTC (permalink / raw) To: Brian Norris; +Cc: linux-mips On Wed, Dec 17, 2014 at 06:39:01PM -0800, Brian Norris wrote: > Fixes sparse warnings: > > arch/mips/jz4740/irq.c:63:6: warning: symbol 'jz4740_irq_suspend' was not declared. Should it be static? > arch/mips/jz4740/irq.c:69:6: warning: symbol 'jz4740_irq_resume' was not declared. Should it be static? > > Also, I've seen some elusive build errors on my automated build test > where JZ4740_IRQ_BASE and NR_IRQS are missing, but I can't reproduce > them manually for some reason. Anyway, mach-jz4740/irq.h should help us > avoid relying on some implicit include. Patch is looking good. There is a known issue building jz in a separate build directory; building in the source directory itself will succeed. Could that be why you can't seem to reproduce the build issue? Ralf ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MIPS: JZ4740: fixup #include's (sparse) 2014-12-18 13:02 ` Ralf Baechle @ 2014-12-18 14:44 ` Ralf Baechle 2014-12-18 17:22 ` Brian Norris 2014-12-18 17:15 ` Brian Norris 1 sibling, 1 reply; 6+ messages in thread From: Ralf Baechle @ 2014-12-18 14:44 UTC (permalink / raw) To: Brian Norris; +Cc: linux-mips On Thu, Dec 18, 2014 at 02:02:03PM +0100, Ralf Baechle wrote: > > > > arch/mips/jz4740/irq.c:63:6: warning: symbol 'jz4740_irq_suspend' was not declared. Should it be static? > > arch/mips/jz4740/irq.c:69:6: warning: symbol 'jz4740_irq_resume' was not declared. Should it be static? > > > > Also, I've seen some elusive build errors on my automated build test > > where JZ4740_IRQ_BASE and NR_IRQS are missing, but I can't reproduce > > them manually for some reason. Anyway, mach-jz4740/irq.h should help us > > avoid relying on some implicit include. > > Patch is looking good. > > There is a known issue building jz in a separate build directory; building > in the source directory itself will succeed. Could that be why you can't > seem to reproduce the build issue? With your patch applied I still can reproduce that build issue issue: [...] CC arch/mips/jz4740/irq.o In file included from /home/ralf/src/linux/linux-mips/include/linux/irq.h:392:0, from /home/ralf/src/linux/linux-mips/include/asm-generic/hardirq.h:12, from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/hardirq.h:16, from /home/ralf/src/linux/linux-mips/include/linux/hardirq.h:8, from /home/ralf/src/linux/linux-mips/include/linux/interrupt.h:12, from /home/ralf/src/linux/linux-mips/arch/mips/jz4740/irq.c:19: /home/ralf/src/linux/linux-mips/include/linux/irqdesc.h:92:33: error: ‘NR_IRQS’ undeclared here (not in a function) extern struct irq_desc irq_desc[NR_IRQS]; ^ make[4]: *** [arch/mips/jz4740/irq.o] Error 1 make[3]: *** [arch/mips/jz4740] Error 2 make[2]: *** [arch/mips] Error 2 make[1]: *** [sub-make] Error 2 make: *** [__sub-make] Error 2 make: Leaving directory `/home/ralf/src/linux/obj/qi_lb60-build' I haven't looked into depth at this but the issue appears to be that the search order for include files is different between building in the source directory and the object directory and that there are multiple include files with the same name, that is irq.h. are involved. So changing the name of the header file should fix this issue but really this also is a kbuild bug. Ralf ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MIPS: JZ4740: fixup #include's (sparse) 2014-12-18 14:44 ` Ralf Baechle @ 2014-12-18 17:22 ` Brian Norris 0 siblings, 0 replies; 6+ messages in thread From: Brian Norris @ 2014-12-18 17:22 UTC (permalink / raw) To: Ralf Baechle; +Cc: linux-mips On Thu, Dec 18, 2014 at 03:44:24PM +0100, Ralf Baechle wrote: > On Thu, Dec 18, 2014 at 02:02:03PM +0100, Ralf Baechle wrote: > > > > > > > arch/mips/jz4740/irq.c:63:6: warning: symbol 'jz4740_irq_suspend' was not declared. Should it be static? > > > arch/mips/jz4740/irq.c:69:6: warning: symbol 'jz4740_irq_resume' was not declared. Should it be static? > > > > > > Also, I've seen some elusive build errors on my automated build test > > > where JZ4740_IRQ_BASE and NR_IRQS are missing, but I can't reproduce > > > them manually for some reason. Anyway, mach-jz4740/irq.h should help us > > > avoid relying on some implicit include. > > > > Patch is looking good. > > > > There is a known issue building jz in a separate build directory; building > > in the source directory itself will succeed. Could that be why you can't > > seem to reproduce the build issue? > > With your patch applied I still can reproduce that build issue issue: Right, I never did straighten this out entirely for myself. And no, I don't claim to have fixed all build issues here. I think the same issue shows up in several other files which reference irq.h too. > [...] > CC arch/mips/jz4740/irq.o > In file included from /home/ralf/src/linux/linux-mips/include/linux/irq.h:392:0, > from /home/ralf/src/linux/linux-mips/include/asm-generic/hardirq.h:12, > from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/hardirq.h:16, > from /home/ralf/src/linux/linux-mips/include/linux/hardirq.h:8, > from /home/ralf/src/linux/linux-mips/include/linux/interrupt.h:12, > from /home/ralf/src/linux/linux-mips/arch/mips/jz4740/irq.c:19: > /home/ralf/src/linux/linux-mips/include/linux/irqdesc.h:92:33: error: ‘NR_IRQS’ undeclared here (not in a function) > extern struct irq_desc irq_desc[NR_IRQS]; > ^ > make[4]: *** [arch/mips/jz4740/irq.o] Error 1 > make[3]: *** [arch/mips/jz4740] Error 2 > make[2]: *** [arch/mips] Error 2 > make[1]: *** [sub-make] Error 2 > make: *** [__sub-make] Error 2 > make: Leaving directory `/home/ralf/src/linux/obj/qi_lb60-build' > > I haven't looked into depth at this but the issue appears to be that the > search order for include files is different between building in the source > directory and the object directory and that there are multiple include > files with the same name, that is irq.h. are involved. > > So changing the name of the header file should fix this issue but really > this also is a kbuild bug. The directory ordering differences do sound familiar. Yeah, I would expect that in-tree and out-of-tree builds should keep as many things as possible the same, to avoid problems like this. Anyway, address this how you'd like (or not at all). I'm only compile-testing; I don't actually use this build. So I'm not very likely to spend the time to fix this one. Thanks, Brian ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MIPS: JZ4740: fixup #include's (sparse) 2014-12-18 13:02 ` Ralf Baechle 2014-12-18 14:44 ` Ralf Baechle @ 2014-12-18 17:15 ` Brian Norris 1 sibling, 0 replies; 6+ messages in thread From: Brian Norris @ 2014-12-18 17:15 UTC (permalink / raw) To: Ralf Baechle; +Cc: linux-mips On Thu, Dec 18, 2014 at 02:02:03PM +0100, Ralf Baechle wrote: > On Wed, Dec 17, 2014 at 06:39:01PM -0800, Brian Norris wrote: > > > Fixes sparse warnings: > > > > arch/mips/jz4740/irq.c:63:6: warning: symbol 'jz4740_irq_suspend' was not declared. Should it be static? > > arch/mips/jz4740/irq.c:69:6: warning: symbol 'jz4740_irq_resume' was not declared. Should it be static? > > > > Also, I've seen some elusive build errors on my automated build test > > where JZ4740_IRQ_BASE and NR_IRQS are missing, but I can't reproduce > > them manually for some reason. Anyway, mach-jz4740/irq.h should help us > > avoid relying on some implicit include. > > Patch is looking good. > > There is a known issue building jz in a separate build directory; building > in the source directory itself will succeed. Could that be why you can't > seem to reproduce the build issue? Yes, that is quite likely the problem. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MIPS: JZ4740: fixup #include's (sparse) 2014-12-18 2:39 [PATCH] MIPS: JZ4740: fixup #include's (sparse) Brian Norris 2014-12-18 13:02 ` Ralf Baechle @ 2014-12-18 15:29 ` Lars-Peter Clausen 1 sibling, 0 replies; 6+ messages in thread From: Lars-Peter Clausen @ 2014-12-18 15:29 UTC (permalink / raw) To: Brian Norris, Ralf Baechle; +Cc: linux-mips On 12/18/2014 03:39 AM, Brian Norris wrote: > Fixes sparse warnings: > > arch/mips/jz4740/irq.c:63:6: warning: symbol 'jz4740_irq_suspend' was not declared. Should it be static? > arch/mips/jz4740/irq.c:69:6: warning: symbol 'jz4740_irq_resume' was not declared. Should it be static? > > Also, I've seen some elusive build errors on my automated build test > where JZ4740_IRQ_BASE and NR_IRQS are missing, but I can't reproduce > them manually for some reason. Anyway, mach-jz4740/irq.h should help us > avoid relying on some implicit include. > > Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Thanks. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-18 17:23 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-18 2:39 [PATCH] MIPS: JZ4740: fixup #include's (sparse) Brian Norris 2014-12-18 13:02 ` Ralf Baechle 2014-12-18 14:44 ` Ralf Baechle 2014-12-18 17:22 ` Brian Norris 2014-12-18 17:15 ` Brian Norris 2014-12-18 15:29 ` Lars-Peter Clausen
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.