Thread (24 messages) 24 messages, 7 authors, 2023-06-22
STALE1073d

[PATCH 05/14] lib: devmem_is_allowed: include linux/io.h

From: Arnd Bergmann <arnd@kernel.org>
Date: 2023-05-17 13:12:39
Also in: linux-arm-kernel, linux-kselftest, linux-mips, linux-mm, linux-pm, linux-riscv, linux-s390, linux-sh, lkml
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

From: Arnd Bergmann <arnd@arndb.de>

The devmem_is_allowed() function is defined in a file of the same name,
but the declaration is in asm/io.h, which is not included there, causing
a W=1 warning:

lib/devmem_is_allowed.c:20:5: error: no previous prototype for 'devmem_is_allowed' [-Werror=missing-prototypes]

Include the appropriate header to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 lib/devmem_is_allowed.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/lib/devmem_is_allowed.c b/lib/devmem_is_allowed.c
index 60be9e24bd57..9c060c69f134 100644
--- a/lib/devmem_is_allowed.c
+++ b/lib/devmem_is_allowed.c
@@ -10,6 +10,7 @@
 
 #include <linux/mm.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 /*
  * devmem_is_allowed() checks to see if /dev/mem access to a certain address
-- 
2.39.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help