diff mbox series

[09/16] ARM: cacheflush: avoid __flush_anon_page() missing-prototype warning

Message ID 20230516154605.517690-10-arnd@kernel.org (mailing list archive)
State Handled Elsewhere
Headers show
Series ARM: address -Wmissing-prototype warnings | expand

Commit Message

Arnd Bergmann May 16, 2023, 3:45 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The prototype for __flush_anon_page() is intentionally hidden
inside the flush_anon_page() inline function to prevent it from
being called from drivers.

When building with 'W=1', this causes a warning:

arch/arm/mm/flush.c:358:6: error: no previous prototype for '__flush_anon_page' [-Werror=missing-prototypes]

Work around this by adding a prototype directly next to the function
definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mm/flush.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 9b112009c708..43678137a9b2 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -355,6 +355,7 @@  EXPORT_SYMBOL(flush_dcache_page);
  *  memcpy() to/from page
  *  if written to page, flush_dcache_page()
  */
+void __flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr);
 void __flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr)
 {
 	unsigned long pfn;