From: Nathan Chancellor <natechancellor@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Christoph Hellwig <hch@lst.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, clang-built-linux@googlegroups.com,
Nathan Chancellor <natechancellor@gmail.com>
Subject: [PATCH 2/2] asm-generic: Make cacheflush.h self-contained
Date: Mon, 22 Jun 2020 16:47:40 -0700 [thread overview]
Message-ID: <20200622234740.72825-3-natechancellor@gmail.com> (raw)
In-Reply-To: <20200622234740.72825-1-natechancellor@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2020-06-23 0:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 23:47 [PATCH 0/2] Small fixes around cacheflush.h Nathan Chancellor
2020-06-22 23:47 ` [PATCH 1/2] media: omap3isp: Remove cacheflush.h Nathan Chancellor
2020-06-23 1:19 ` Laurent Pinchart
2020-06-23 6:15 ` Christoph Hellwig
2020-06-23 6:20 ` Mauro Carvalho Chehab
2020-06-22 23:47 ` Nathan Chancellor [this message]
2020-06-23 6:15 ` [PATCH 2/2] asm-generic: Make cacheflush.h self-contained Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200622234740.72825-3-natechancellor@gmail.com \
--to=natechancellor@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=clang-built-linux@googlegroups.com \
--cc=geert@linux-m68k.org \
--cc=hch@lst.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).