Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: PDT: Fix missing prototype warning

As reported by the kernel test robot, the following error occurs:

arch/parisc/kernel/pdt.c:65:6: warning: no previous prototype for 'arch_report_meminfo' [-Wmissing-prototypes]
65 | void arch_report_meminfo(struct seq_file *m)
| ^~~~~~~~~~~~~~~~~~~

arch_report_meminfo() is declared in include/linux/proc_fs.h and only
defined when CONFIG_PROC_FS is enabled. Wrap its definition in #ifdef
CONFIG_PROC_FS to fix the -Wmissing-prototypes warning.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502082315.IPaHaTyM-lkp@intel.com/
Signed-off-by: Yu-Chun Lin <eleanor15x@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Yu-Chun Lin and committed by
Helge Deller
b8999817 4e3ff3c5

+2
+2
arch/parisc/kernel/pdt.c
··· 63 63 #define PDT_ADDR_PERM_ERR (pdt_type != PDT_PDC ? 2UL : 0UL) 64 64 #define PDT_ADDR_SINGLE_ERR 1UL 65 65 66 + #ifdef CONFIG_PROC_FS 66 67 /* report PDT entries via /proc/meminfo */ 67 68 void arch_report_meminfo(struct seq_file *m) 68 69 { ··· 75 74 seq_printf(m, "PDT_cur_entries: %7lu\n", 76 75 pdt_status.pdt_entries); 77 76 } 77 + #endif 78 78 79 79 static int get_info_pat_new(void) 80 80 {