mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lib: include <linux/io.h> for devmem_is_allowed definition
@ 2022-07-13 22:23 Ben Dooks
  0 siblings, 0 replies; only message in thread
From: Ben Dooks @ 2022-07-13 22:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Sudip Mukherjee, Jude Onyenegecha, Ben Dooks

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?

Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
---
 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.35.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-13 22:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 22:23 [PATCH] lib: include <linux/io.h> for devmem_is_allowed definition Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®