powerpc/irq: Fix undefined reference to irq_proc_emit_counts on CONFIG_PROC_FS=n
Shrikanth Hegde
reviewerPATCH 1/1 powerpc/irq: Fix undefined reference to irq_proc_emit_counts on CONFIG_PROC_FS=n
kernel test robot reported a randconfig failure due to below error.
ld.lld: error: undefined symbol: irq_proc_emit_counts
referenced by irq.c:116 (arch/powerpc/kernel/irq.c:116)
arch/powerpc/kernel/irq.o:(arch_show_interrupts) in archive vmlinux.a
This happens when CONFIG_PROC_FS=n, since irq_proc_emit_counts is defined only when it is true. Though it is a rare config, but it is a possible one.
Fix it by gating against the config. arch_show_interrupts() is called only by irq_seq_show() which is compiled when CONFIG_PROC_FS=y. So keeping the config gating is sufficient.
Fixes fbb22ceaaf8f ("powerpc/irq: Make irqstats array based")
Reported-by kernel test robot <[email protected]>
Signed-off-by Shrikanth Hegde <[email protected]>
--- arch/powerpc/kernel/irq.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/kernel/irq.c +2 -0
@@ -122,6 +122,7 @@ void inc_irq_stat_and_enable(enum irq_stat_counts which)set_bit (which, irq_stat_count_show); } +#ifdef CONFIG_PROC_FS int arch_show_interrupts (struct seq_file *p,int prec) {const struct irq_stat_info *info = irq_stat_info;
@@ -155,6 +156,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)#endif return 0; } +#endif static int __init irq_init_stats (void ) {
Signature · 1 line
2.52.0