Skip to contentSkip to conversation

sparc: cacheflush_32.h needs struct page

PATCH In review Randy Dunlap 3 participants 3 messages Apr 9, 2022 – Apr 10, 2022 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sparc: cacheflush_32.h needs struct page

Add a struct page forward declaration to cacheflush_32.h. Fixes this build warning:

CC drivers/crypto/xilinx/zynqmp-sha.o
In file included from ../arch/sparc/include/asm/cacheflush.h:11,
from ../include/linux/cacheflush.h:5,
from ../drivers/crypto/xilinx/zynqmp-sha.c:6:
../arch/sparc/include/asm/cacheflush_32.h:38:37: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration
38 | void sparc_flush_page_to_ram(struct page *page);

Exposed by commit 0e03b8fd2936
("crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST") but not Fixes: that commit.

---
v2: use forward declaration instead of adding <linux/mm.h> (Sam)

 arch/sparc/include/asm/cacheflush_32.h |    1 +
 1 file changed, 1 insertion(+)
arch/sparc/include/asm/cacheflush_32.h +1 -0
@@ -35,6 +35,7 @@
 #define flush_page_for_dma(addr) \
 	sparc32_cachetlb_ops->page_for_dma(addr)
 
+struct page;
 void sparc_flush_page_to_ram(struct page *page);
 
 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
Acked-by on v2 1/1
#1 lore raw
Quoted 14 lines · Randy Dunlap

Add a struct page forward declaration to cacheflush_32.h. Fixes this build warning:

CC drivers/crypto/xilinx/zynqmp-sha.o
In file included from ../arch/sparc/include/asm/cacheflush.h:11,
from ../include/linux/cacheflush.h:5,
from ../drivers/crypto/xilinx/zynqmp-sha.c:6:
../arch/sparc/include/asm/cacheflush_32.h:38:37: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration
38 | void sparc_flush_page_to_ram(struct page *page);

Exposed by commit 0e03b8fd2936
("crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST") but not Fixes: that commit.

Quoted 6 lines
Quoted 16 lines

---
v2: use forward declaration instead of adding <linux/mm.h> (Sam)

 arch/sparc/include/asm/cacheflush_32.h |    1 +
 1 file changed, 1 insertion(+)
arch/sparc/include/asm/cacheflush_32.h +1 -0
@@ -35,6 +35,7 @@
 #define flush_page_for_dma(addr) \
 	sparc32_cachetlb_ops->page_for_dma(addr)
 
+struct page;
 void sparc_flush_page_to_ram(struct page *page);
 
 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
Acked-by on v2 1/1
#2 lore raw
In reply to Randy Dunlap
Quoted 20 lines · Randy Dunlap

Add a struct page forward declaration to cacheflush_32.h. Fixes this build warning:

CC drivers/crypto/xilinx/zynqmp-sha.o
In file included from ../arch/sparc/include/asm/cacheflush.h:11,
from ../include/linux/cacheflush.h:5,
from ../drivers/crypto/xilinx/zynqmp-sha.c:6:
../arch/sparc/include/asm/cacheflush_32.h:38:37: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration
38 | void sparc_flush_page_to_ram(struct page *page);

Exposed by commit 0e03b8fd2936
("crypto: xilinx - Turn SHA into a tristate and allow COMPILE_TEST") but not Fixes: that commit.

Quoted 5 lines

---
v2: use forward declaration instead of adding <linux/mm.h> (Sam)

 arch/sparc/include/asm/cacheflush_32.h |    1 +
 1 file changed, 1 insertion(+)

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt