[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210520084809.8576-6-mgorman@techsingularity.net>
Date: Thu, 20 May 2021 09:48:00 +0100
From: Mel Gorman <mgorman@...hsingularity.net>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Michal Hocko <mhocko@...nel.org>,
David Hildenbrand <david@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>,
Dan Streetman <ddstreet@...e.org>,
Yang Shi <shy828301@...il.com>, Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...hsingularity.net>
Subject: [PATCH 05/14] mm/early_ioremap: Add prototype for early_memremap_pgprot_adjust
make W=1 generates the following warning for mm/early_ioremap.c
mm/early_ioremap.c:34:24: warning: no previous prototype for ‘early_memremap_pgprot_adjust’ [-Wmissing-prototypes]
pgprot_t __init __weak early_memremap_pgprot_adjust(resource_size_t phys_addr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
The weak functions that can be overridden by architectures are
declared in include/asm-generic/early_ioremap.h so add the prototype
there. The asm/fixmap.h header is need for pgprot_t.
Signed-off-by: Mel Gorman <mgorman@...hsingularity.net>
---
include/asm-generic/early_ioremap.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/asm-generic/early_ioremap.h b/include/asm-generic/early_ioremap.h
index 9def22e6e2b3..022f8f908b42 100644
--- a/include/asm-generic/early_ioremap.h
+++ b/include/asm-generic/early_ioremap.h
@@ -3,6 +3,7 @@
#define _ASM_EARLY_IOREMAP_H_
#include <linux/types.h>
+#include <asm/fixmap.h>
/*
* early_ioremap() and early_iounmap() are for temporary early boot-time
@@ -19,6 +20,14 @@ extern void *early_memremap_prot(resource_size_t phys_addr,
extern void early_iounmap(void __iomem *addr, unsigned long size);
extern void early_memunmap(void *addr, unsigned long size);
+/*
+ * Weak function called by early_memremap and early_memremap_ro. It does
+ * nothing, but architectures may provide their own version to handle
+ * memory encryption.
+ */
+extern pgprot_t early_memremap_pgprot_adjust(resource_size_t phys_addr,
+ unsigned long size, pgprot_t prot);
+
/*
* Weak function called by early_ioremap_reset(). It does nothing, but
* architectures may provide their own version to do any needed cleanups.
--
2.26.2
Powered by blists - more mailing lists