Skip to contentSkip to conversation

lib: include <linux/io.h> for devmem_is_allowed definition

PATCH New Ben Dooks 1 participant 1 message Jul 13, 2022 Library code

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 lib: include <linux/io.h> for devmem_is_allowed definition

The devmem_is_allowed() is defined in <asm/io.h> but this or <linux/io.h> is not included in lib/devmem_is_allowed.c does not include it. Fix the following sparse warning by including <linux/io.h>

lib/devmem_is_allowed.c:20:5: warning: symbol 'devmem_is_allowed' was not declared. Should it be static?

---
 lib/devmem_is_allowed.c | 1 +
 1 file changed, 1 insertion(+)
lib/devmem_is_allowed.c +1 -0
index 60be9e24bd57..9c060c69f134 100644
@@ -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
Signature · 1 line
2.35.1