parisc: PDT: Fix missing prototype warning
PATCH 1/1 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.
--- arch/parisc/kernel/pdt.c | 2 ++ 1 file changed, 2 insertions(+)
arch/parisc/kernel/pdt.c +2 -0
@@ -63,6 +63,7 @@ static unsigned long pdt_entry[MAX_PDT_ENTRIES] __page_aligned_bss;#define PDT_ADDR_PERM_ERR (pdt_type != PDT_PDC ? 2UL : 0UL)#define PDT_ADDR_SINGLE_ERR 1UL +#ifdef CONFIG_PROC_FS /* report PDT entries via /proc/meminfo */ void arch_report_meminfo (struct seq_file *m) {
@@ -74,6 +75,7 @@ void arch_report_meminfo(struct seq_file *m)seq_printf (m,"PDT_cur_entries: %7lu\n" , pdt_status.pdt_entries); } +#endif static int get_info_pat_new (void ) {
Signature · 1 line
2.43.0
Quoted 6 lines · Yu-Chun Lin
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 | voidarch_report_meminfo(struct seq_file *m)
| ^~~~~~~~~~~~~~~~~~~
Quoted 7 lines
arch_report_meminfo()is declared ininclude/linux/proc_fs.hand only defined whenCONFIG_PROC_FSis enabled. Wrap its definition in #ifdefCONFIG_PROC_FSto fix the -Wmissing-prototypes warning.Reported-by kernel test robot <[email protected]>Signed-off-by Yu-Chun Lin <[email protected]>
applied.
Thanks!
Helge