Skip to content

Commit ce3e837

Browse files
lucvooGreg Ungerer
authored andcommitted
m68k,nommu: add missing __user in uaccess' __ptr() macro
The assembly for __get_user() & __put_user() uses a macro, __ptr(), to cast the pointer to 'unsigned long *' but the pointer is always a __user one and so this cast creates a lot of warnings when using Sparse. So, change to the cast to 'unsigned long __user *'. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Luc Van Oostenryck <[email protected]> Signed-off-by: Greg Ungerer <[email protected]>
1 parent e000910 commit ce3e837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/m68k/include/asm/uaccess_no.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extern int __put_user_bad(void);
6060
* aliasing issues.
6161
*/
6262

63-
#define __ptr(x) ((unsigned long *)(x))
63+
#define __ptr(x) ((unsigned long __user *)(x))
6464

6565
#define __put_user_asm(err,x,ptr,bwl) \
6666
__asm__ ("move" #bwl " %0,%1" \

0 commit comments

Comments
 (0)