aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/math-emu/math.c
diff options
context:
space:
mode:
authorAl Viro <[email protected]>2020-12-31 23:23:01 +0000
committerRich Felker <[email protected]>2021-09-17 13:59:56 -0400
commitca42bc4b7bda7c6d68f1cc97c27fc8ff7385c4c7 (patch)
tree5f4e39c390f876efa422c477b3770389832a252d /arch/sh/math-emu/math.c
parent6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f (diff)
sh: fix trivial misannotations
Trivial misannotations in * get_user() (__gu_addr is a userland pointer there) * ip_fast_csum() (sum is __wsum, not unsigned int) * csum_and_copy_to_user() (destination is void *, not const void * - mea culpa) * __clear_user() (to is a userland pointer) * several places in kernel/traps_32.c (regs->pc is a userland pointer when regs is a userland pt_regs) * math-emu/math.c: READ() and WRITE() casts of address should be to userland pointer. No changes in code generation and those take care of the majority of noise from sparse on sh builds. Signed-off-by: Al Viro <[email protected]> Tested-by: John Paul Adrian Glaubitz <[email protected]> Signed-off-by: Rich Felker <[email protected]>
Diffstat (limited to 'arch/sh/math-emu/math.c')
-rw-r--r--arch/sh/math-emu/math.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c
index e8be0eca0444..3495a48b7713 100644
--- a/arch/sh/math-emu/math.c
+++ b/arch/sh/math-emu/math.c
@@ -51,8 +51,8 @@
#define Rn (regs->regs[n])
#define Rm (regs->regs[m])
-#define WRITE(d,a) ({if(put_user(d, (typeof (d)*)a)) return -EFAULT;})
-#define READ(d,a) ({if(get_user(d, (typeof (d)*)a)) return -EFAULT;})
+#define WRITE(d,a) ({if(put_user(d, (typeof (d) __user *)a)) return -EFAULT;})
+#define READ(d,a) ({if(get_user(d, (typeof (d) __user *)a)) return -EFAULT;})
#define PACK_S(r,f) FP_PACK_SP(&r,f)
#define UNPACK_S(f,r) FP_UNPACK_SP(f,&r)