diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2018-10-06 18:51:12 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-13 13:21:25 +0200 |
commit | 3b35bd48b8a06e02a25af84baba782876b8a6572 (patch) | |
tree | 3fb42a11174ef25091ba89d32531905da41cc198 /arch/powerpc/kernel/process.c | |
parent | powerpc/64: properly initialise the stackprotector canary on SMP. (diff) | |
download | linux-3b35bd48b8a06e02a25af84baba782876b8a6572.tar.xz linux-3b35bd48b8a06e02a25af84baba782876b8a6572.zip |
powerpc/process: Fix sparse address space warnings
This patch fixes the following warnings, which are leftovers
from when __get_user() was replaced by probe_kernel_address().
arch/powerpc/kernel/process.c:1287:22: warning: incorrect type in argument 2 (different address spaces)
arch/powerpc/kernel/process.c:1287:22: expected void const *src
arch/powerpc/kernel/process.c:1287:22: got unsigned int [noderef] <asn:1>*<noident>
arch/powerpc/kernel/process.c:1319:21: warning: incorrect type in argument 2 (different address spaces)
arch/powerpc/kernel/process.c:1319:21: expected void const *src
arch/powerpc/kernel/process.c:1319:21: got unsigned int [noderef] <asn:1>*<noident>
Fixes: 7b051f665c32d ("powerpc: Use probe_kernel_address in show_instructions")
Reviewed-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Split out of larger patch]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index d9d4eb2ea6c9..c7af42052041 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1281,7 +1281,7 @@ static void show_instructions(struct pt_regs *regs) #endif if (!__kernel_text_address(pc) || - probe_kernel_address((unsigned int __user *)pc, instr)) { + probe_kernel_address((const void *)pc, instr)) { pr_cont("XXXXXXXX "); } else { if (regs->nip == pc) @@ -1323,7 +1323,7 @@ void show_user_instructions(struct pt_regs *regs) pr_info("%s[%d]: code: ", current->comm, current->pid); } - if (probe_kernel_address((unsigned int __user *)pc, instr)) { + if (probe_kernel_address((const void *)pc, instr)) { pr_cont("XXXXXXXX "); } else { if (regs->nip == pc) |