Skip to content

Commit

Permalink
m68k,nommu: add missing __user in uaccess' __ptr() macro
Browse files Browse the repository at this point in the history
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 <lkp@intel.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
  • Loading branch information
Luc Van Oostenryck authored and Greg Ungerer committed May 30, 2020
1 parent e000910 commit ce3e837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/m68k/include/asm/uaccess_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern int __put_user_bad(void);
* aliasing issues.
*/

#define __ptr(x) ((unsigned long *)(x))
#define __ptr(x) ((unsigned long __user *)(x))

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

0 comments on commit ce3e837

Please sign in to comment.