Message ID | 2c2123998e05535d08ba03a96ea1eea921d06a86.1621435024.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Cleanup use of 'struct ppc_inst' | expand |
Related | show |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (3a81c0495fdb91fd9a9b4f617098c283131eeae1) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 19 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/inst.h index 887ef150fdda..57c31e712e67 100644 --- a/arch/powerpc/include/asm/inst.h +++ b/arch/powerpc/include/asm/inst.h @@ -9,16 +9,15 @@ #define ___get_user_instr(gu_op, dest, ptr) \ ({ \ long __gui_ret = 0; \ - unsigned long __gui_ptr = (unsigned long)ptr; \ + unsigned int __user *__gui_ptr = (unsigned int __user *)ptr; \ struct ppc_inst __gui_inst; \ unsigned int __prefix, __suffix; \ \ __chk_user_ptr(ptr); \ - __gui_ret = gu_op(__prefix, (unsigned int __user *)__gui_ptr); \ + __gui_ret = gu_op(__prefix, __gui_ptr); \ if (__gui_ret == 0) { \ if ((__prefix >> 26) == OP_PREFIX) { \ - __gui_ret = gu_op(__suffix, \ - (unsigned int __user *)__gui_ptr + 1); \ + __gui_ret = gu_op(__suffix, __gui_ptr + 1); \ __gui_inst = ppc_inst_prefix(__prefix, \ __suffix); \ } else { \
Declare __gui_ptr as 'unsigned int *' instead of casting it at each use. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- arch/powerpc/include/asm/inst.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)