diff options
| author | Alexandre Ghiti <[email protected]> | 2025-09-03 18:53:09 +0000 |
|---|---|---|
| committer | Paul Walmsley <[email protected]> | 2025-09-05 21:33:52 +0000 |
| commit | a03ee11b8f850bd008226c6d392da24163dfb56e (patch) | |
| tree | f3a4b54e3666360d6130d4228f8729b1ef9b993e /scripts/make_fit.py | |
| parent | riscv: Fix sparse warning in __get_user_error() (diff) | |
| download | kernel-a03ee11b8f850bd008226c6d392da24163dfb56e.tar.gz kernel-a03ee11b8f850bd008226c6d392da24163dfb56e.zip | |
riscv: Fix sparse warning about different address spaces
We did not propagate the __user attribute of the pointers in
__get_kernel_nofault() and __put_kernel_nofault(), which results in
sparse complaining:
>> mm/maccess.c:41:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long long [usertype] * @@
mm/maccess.c:41:17: sparse: expected void const [noderef] __user *from
mm/maccess.c:41:17: sparse: got unsigned long long [usertype] *
So fix this by correctly casting those pointers.
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Suggested-by: Al Viro <[email protected]>
Fixes: f6bff7827a48 ("riscv: uaccess: use 'asm_goto_output' for get_user()")
Cc: [email protected]
Signed-off-by: Alexandre Ghiti <[email protected]>
Reviewed-by: Cyril Bur <[email protected]>
Link: https://lore.kernel.org/r/20250903-dev-alex-sparse_warnings_v1-v1-2-7e6350beb700@rivosinc.com
Signed-off-by: Paul Walmsley <[email protected]>
Diffstat (limited to 'scripts/make_fit.py')
0 files changed, 0 insertions, 0 deletions
