riscv: use NULL instead of a plain 0
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Fri, 1 Jun 2018 15:21:21 +0000 (17:21 +0200)
committerPalmer Dabbelt <palmer@sifive.com>
Thu, 7 Jun 2018 15:01:50 +0000 (08:01 -0700)
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>
arch/riscv/include/asm/cacheflush.h
arch/riscv/include/asm/tlbflush.h

index efd89a88d2d0e9b2bcd639a436a6143440a24d77..8f13074413a7d652729f7fc4871ac5d2a74eea3e 100644 (file)
@@ -47,7 +47,7 @@ static inline void flush_dcache_page(struct page *page)
 
 #else /* CONFIG_SMP */
 
-#define flush_icache_all() sbi_remote_fence_i(0)
+#define flush_icache_all() sbi_remote_fence_i(NULL)
 void flush_icache_mm(struct mm_struct *mm, bool local);
 
 #endif /* CONFIG_SMP */
index 7b209aec355db5edeff57c186f542ad4ac44c894..85c2d8bae9571ab2c3557b34b04b59d3355733a6 100644 (file)
@@ -49,7 +49,7 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
 
 #include <asm/sbi.h>
 
-#define flush_tlb_all() sbi_remote_sfence_vma(0, 0, -1)
+#define flush_tlb_all() sbi_remote_sfence_vma(NULL, 0, -1)
 #define flush_tlb_page(vma, addr) flush_tlb_range(vma, addr, 0)
 #define flush_tlb_range(vma, start, end) \
        sbi_remote_sfence_vma(mm_cpumask((vma)->vm_mm)->bits, \