make asm-generic/cacheflush.h more standalone
PATCH 1/1 make asm-generic/cacheflush.h more standalone
Some s390 builds get these warnings:
include/asm-generic/cacheflush.h:16:42: warning: 'struct mm_struct' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:22:46: warning: 'struct mm_struct' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:28:45: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:36:44: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:44:45: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:52:50: warning: 'struct address_space' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:58:52: warning: 'struct address_space' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:75:17: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:74:45: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:82:16: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/cacheflush.h:81:50: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration
Forward declare the named structs to get rid of these.
--- include/asm-generic/cacheflush.h | 5 +++++ 1 file changed, 5 insertions(+)
include/asm-generic/cacheflush.h +5 -0
@@ -2,6 +2,11 @@#ifndef _ASM_GENERIC_CACHEFLUSH_H#define _ASM_GENERIC_CACHEFLUSH_H +struct mm_struct ; +struct vm_area_struct ; +struct page ; +struct address_space ; +/* * The cache doesn't need to be flushed when TLB entries change when * the cache is mapped to physical memory, not virtual memory
Signature · 5 lines
2.27.0 -- Cheers, Stephen Rothwell
Looks good:
Quoted 17 lines · Stephen Rothwell
Some s390 builds get these warnings:
include/asm-generic/cacheflush.h:16:42: warning: 'structmm_struct' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:22:46: warning: 'structmm_struct' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:28:45: warning: 'structvm_area_struct' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:36:44: warning: 'structvm_area_struct' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:44:45: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:52:50: warning: 'structaddress_space' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:58:52: warning: 'structaddress_space' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:75:17: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:74:45: warning: 'structvm_area_struct' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:82:16: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declarationinclude/asm-generic/cacheflush.h:81:50: warning: 'structvm_area_struct' declared inside parameter list will not be visible outside of this definition or declarationForward declare the named structs to get rid of these.
Quoted 9 lines
Fixes e0cf615d725c ("asm-generic: don't include <linux/mm.h> in cacheflush.h")Cc Christoph Hellwig <[email protected]>Cc Andrew Morton <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Signed-off-by Stephen Rothwell <[email protected]>