RISC-V: Make our port sparse-clean
This patch set contains a handful of fixes that clean up the sparse results for the RISC-V port. These patches shouldn't have any functional difference. The patches: * Use NULL instead of 0. * Clean up __user annotations. * Split __copy_user into two functions, to make the __user annotations valid. Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
This commit is contained in:
@@ -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 */
|
||||
|
@@ -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, \
|
||||
|
@@ -392,19 +392,21 @@ do { \
|
||||
})
|
||||
|
||||
|
||||
extern unsigned long __must_check __copy_user(void __user *to,
|
||||
extern unsigned long __must_check __asm_copy_to_user(void __user *to,
|
||||
const void *from, unsigned long n);
|
||||
extern unsigned long __must_check __asm_copy_from_user(void *to,
|
||||
const void __user *from, unsigned long n);
|
||||
|
||||
static inline unsigned long
|
||||
raw_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
{
|
||||
return __copy_user(to, from, n);
|
||||
return __asm_copy_to_user(to, from, n);
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
raw_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
{
|
||||
return __copy_user(to, from, n);
|
||||
return __asm_copy_from_user(to, from, n);
|
||||
}
|
||||
|
||||
extern long strncpy_from_user(char *dest, const char __user *src, long count);
|
||||
|
Reference in New Issue
Block a user