Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

riscv: use NULL instead of a plain 0

sbi_remote_sfence_vma() & sbi_remote_fence_i() takes
a pointer as first argument but some macros call them with
a plain 0 which, while legal C, is frowned upon in the kernel.

Change this by replacing the 0 by NULL.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>

authored by

Luc Van Oostenryck and committed by
Palmer Dabbelt
2861ae30 29dcea88

+2 -2
+1 -1
arch/riscv/include/asm/cacheflush.h
··· 47 47 48 48 #else /* CONFIG_SMP */ 49 49 50 - #define flush_icache_all() sbi_remote_fence_i(0) 50 + #define flush_icache_all() sbi_remote_fence_i(NULL) 51 51 void flush_icache_mm(struct mm_struct *mm, bool local); 52 52 53 53 #endif /* CONFIG_SMP */
+1 -1
arch/riscv/include/asm/tlbflush.h
··· 49 49 50 50 #include <asm/sbi.h> 51 51 52 - #define flush_tlb_all() sbi_remote_sfence_vma(0, 0, -1) 52 + #define flush_tlb_all() sbi_remote_sfence_vma(NULL, 0, -1) 53 53 #define flush_tlb_page(vma, addr) flush_tlb_range(vma, addr, 0) 54 54 #define flush_tlb_range(vma, start, end) \ 55 55 sbi_remote_sfence_vma(mm_cpumask((vma)->vm_mm)->bits, \