Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: riscv: mm: call test_and_clear_bit uses a type cast
arch/riscv/mm/pgtable.c: In function 'ptep_test_and_clear_young': arch/riscv/mm/pgtable.c:27:51: error: passing argument 2 of 'test_and_clear_bit' from incompatible pointer type [-Werror=incompatible-pointer-types] 27 | return test_and_clear_bit(_PAGE_ACCESSED_OFFSET, &pte_val(*ptep)); In file included from ./include/linux/bitops.h:68, from ./include/linux/thread_info.h:27, from ./include/asm-generic/preempt.h:5, from ./arch/riscv/include/generated/asm/preempt.h:1, from ./include/linux/preempt.h:79, from ./include/linux/spinlock.h:56, from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:7, from ./include/linux/mm.h:7, from ./arch/riscv/include/asm/pgalloc.h:10, from arch/riscv/mm/pgtable.c:3: ./arch/riscv/include/asm/bitops.h:83:70: note: expected 'volatile long unsigned int *' but argument is of type 'u64 *' {aka 'long long unsigned int *'} 83 | static inline int test_and_clear_bit(int nr, volatile unsigned long *addr) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ cc1: some warnings being treated as errors make[8]: *** [scripts/Makefile.build:243: arch/riscv/mm/pgtable.o] Error 1 Signed-off-by: Han Gao <[email protected]> Signed-off-by: Han Gao <[email protected]>
- Loading branch information