[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200622234740.72825-3-natechancellor@gmail.com>
Date: Mon, 22 Jun 2020 16:47:40 -0700
From: Nathan Chancellor <natechancellor@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Arnd Bergmann <arnd@...db.de>, Christoph Hellwig <hch@....de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, clang-built-linux@...glegroups.com,
Nathan Chancellor <natechancellor@...il.com>
Subject: [PATCH 2/2] asm-generic: Make cacheflush.h self-contained
Currently, cacheflush.h has to be included after mm.h to avoid several
-Wvisibility warnings:
$ clang -Wvisibility -fsyntax-only include/asm-generic/cacheflush.h
include/asm-generic/cacheflush.h:16:42: warning: declaration of 'struct
mm_struct' will not be visible outside of this function [-Wvisibility]
static inline void flush_cache_mm(struct mm_struct *mm)
^
...
include/asm-generic/cacheflush.h:28:45: warning: declaration of 'struct
vm_area_struct' will not be visible outside of this function
[-Wvisibility]
static inline void flush_cache_range(struct vm_area_struct *vma,
^
...
Add a few forward declarations should that there are no warnings and the
ordering of the includes does not matter.
Fixes: e0cf615d725c ("asm-generic: don't include <linux/mm.h> in cacheflush.h")
Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
---
include/asm-generic/cacheflush.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/asm-generic/cacheflush.h b/include/asm-generic/cacheflush.h
index 907fa5d16494..093b743da596 100644
--- a/include/asm-generic/cacheflush.h
+++ b/include/asm-generic/cacheflush.h
@@ -2,6 +2,11 @@
#ifndef _ASM_GENERIC_CACHEFLUSH_H
#define _ASM_GENERIC_CACHEFLUSH_H
+struct address_space;
+struct mm_struct;
+struct page;
+struct vm_area_struct;
+
/*
* The cache doesn't need to be flushed when TLB entries change when
* the cache is mapped to physical memory, not virtual memory
--
2.27.0
Powered by blists - more mailing lists