lkml.org 
[lkml]   [2022]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] lib: include <linux/io.h> for devmem_is_allowed definition
Date
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
\
 
 \ /
  Last update: 2022-07-14 00:24    [W:0.030 / U:4.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site