Skip to contentSkip to conversation

cacheflush.h: Add forward declaration for struct folio

PATCH Guenter Roeck 1 participant 1 message Mar 23, 2022 Crypto API

lore
Share & tools
lore

Guenter Roeck

author Tested-by
#0 lore raw
Quoted 18 lines · Herbert Xu
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Herbert Xu

This patch turns the new SHA driver into a tristate and also allows compile testing.

Quoted 8 lines

This results in:

Building s390:allmodconfig ... failed
--------------
Error log:
In file included from drivers/crypto/xilinx/zynqmp-sha.c:6:
include/linux/cacheflush.h:12:46: error: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
12 | static inline void flush_dcache_folio(struct folio *folio)

This should be fixed in cacheflush.h:

Quoted 8 lines

---8<---
The struct folio is not declared in cacheflush.h so we need to provide a forward declaration as otherwise users of this header file may get warnings.

Fixes 522a0032af00 ("Add linux/cacheflush.h")

Guenter

Quoted 18 lines
include/linux/cacheflush.h +2 -0
index fef8b607f97e..a6189d21f2ba 100644
@@ -4,6 +4,8 @@
 
 #include <asm/cacheflush.h>
 
+struct folio;
+
 #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
 #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO
 void flush_dcache_folio(struct folio *folio);
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