diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-01-01 00:23:01 +0100 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2021-09-17 19:59:56 +0200 |
commit | ca42bc4b7bda7c6d68f1cc97c27fc8ff7385c4c7 (patch) | |
tree | 5f4e39c390f876efa422c477b3770389832a252d /arch/sh/mm | |
parent | Linux 5.15-rc1 (diff) | |
download | linux-ca42bc4b7bda7c6d68f1cc97c27fc8ff7385c4c7.tar.xz linux-ca42bc4b7bda7c6d68f1cc97c27fc8ff7385c4c7.zip |
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 <viro@zeniv.linux.org.uk>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Rich Felker <dalias@libc.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r-- | arch/sh/mm/nommu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/mm/nommu.c b/arch/sh/mm/nommu.c index 8b4504413c5f..78c4b6e6d33b 100644 --- a/arch/sh/mm/nommu.c +++ b/arch/sh/mm/nommu.c @@ -28,9 +28,9 @@ __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n) return 0; } -__kernel_size_t __clear_user(void *to, __kernel_size_t n) +__kernel_size_t __clear_user(void __user *to, __kernel_size_t n) { - memset(to, 0, n); + memset((__force void *)to, 0, n); return 0; } |