]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mips: fix compilation error
authorNicola Vetrini <nicola.vetrini@gmail.com>
Mon, 25 Aug 2025 21:42:45 +0000 (23:42 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:06 +0000 (17:25 -0700)
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@mail.gmail.com/
Link: https://lkml.kernel.org/r/20250825214245.1838158-1-nicola.vetrini@gmail.com
Signed-off-by: Nicola Vetrini <nicola.vetrini@gmail.com>
Cc: Anders Roxell <anders.roxell@linaro.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/mips/include/asm/cacheflush.h

index 1f14132b3fc98afb6c44de0b7efda4d820978278..5d283ef89d90d61802693e1679762d9236c42949 100644 (file)
 #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);