[PATCH] mips: fix compilation error
From: Nicola Vetrini
Date: Mon Aug 25 2025 - 17:51:12 EST
The following build error occurs on a mips build configuration
(32r2el_defconfig and similar ones)
./arch/mips/include/asm/cacheflush.h:42:34: error: passing argument 2 of ‘set_bit’
from incompatible pointer type [-Werror=incompatible-pointer-types]
42 | set_bit(PG_dcache_dirty, &(folio)->flags)
| ^~~~~~~~~~~~~~~
| |
| memdesc_flags_t *
This is due to changes introduced by
commit 30f45bf18d55 ("mm: introduce memdesc_flags_t"), which did not update
these usage sites.
Link: https://lore.kernel.org/lkml/CA+G9fYvkpmqGr6wjBNHY=dRp71PLCoi2341JxOudi60yqaeUdg@xxxxxxxxxxxxxx/
Fixes: 30f45bf18d55 ("mm: introduce memdesc_flags_t")
Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxx>
---
First time sending a Linux patch, so I may have gotten some part of
it wrong.
Bisection was done at the provided link.
---
arch/mips/include/asm/cacheflush.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h
index 1f14132b3fc9..5d283ef89d90 100644
--- a/arch/mips/include/asm/cacheflush.h
+++ b/arch/mips/include/asm/cacheflush.h
@@ -37,11 +37,11 @@
#define PG_dcache_dirty PG_arch_1
#define folio_test_dcache_dirty(folio) \
- test_bit(PG_dcache_dirty, &(folio)->flags)
+ test_bit(PG_dcache_dirty, &(folio)->flags.f)
#define folio_set_dcache_dirty(folio) \
- set_bit(PG_dcache_dirty, &(folio)->flags)
+ set_bit(PG_dcache_dirty, &(folio)->flags.f)
#define folio_clear_dcache_dirty(folio) \
- clear_bit(PG_dcache_dirty, &(folio)->flags)
+ clear_bit(PG_dcache_dirty, &(folio)->flags.f)
extern void (*flush_cache_all)(void);
extern void (*__flush_cache_all)(void);
base-commit: 6c68f4c0a147c025ae0b25fab688c7c47964a02f
--
2.43.0