* [PATCH] parisc: PDT: Fix missing prototype warning
@ 2025-02-08 17:43 Yu-Chun Lin
2025-02-28 7:05 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Yu-Chun Lin @ 2025-02-08 17:43 UTC (permalink / raw)
To: James.Bottomley, deller
Cc: linux-parisc, linux-kernel, jserv, visitorckw, Yu-Chun Lin,
kernel test robot
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>
---
arch/parisc/kernel/pdt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c
index 0f9b3b5914cf..b70b67adb855 100644
--- a/arch/parisc/kernel/pdt.c
+++ b/arch/parisc/kernel/pdt.c
@@ -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)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] parisc: PDT: Fix missing prototype warning
2025-02-08 17:43 [PATCH] parisc: PDT: Fix missing prototype warning Yu-Chun Lin
@ 2025-02-28 7:05 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2025-02-28 7:05 UTC (permalink / raw)
To: Yu-Chun Lin, James.Bottomley
Cc: linux-parisc, linux-kernel, jserv, visitorckw, kernel test robot
On 2/8/25 18:43, Yu-Chun Lin wrote:
> 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>
applied.
Thanks!
Helge
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-28 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08 17:43 [PATCH] parisc: PDT: Fix missing prototype warning Yu-Chun Lin
2025-02-28 7:05 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).