Message ID | 20200622234740.72825-3-natechancellor@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Small fixes around cacheflush.h | expand |
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
Stephen also just sent a very similar one.
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
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(+)