[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200529190218.36560-2-luc.vanoostenryck@gmail.com>
Date: Fri, 29 May 2020 21:02:17 +0200
From: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>,
Greg Ungerer <gerg@...ux-m68k.org>
Cc: linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
kbuild test robot <lkp@...el.com>
Subject: [PATCH v2 1/2] 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 <lkp@...el.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
---
arch/m68k/include/asm/uaccess_no.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/include/asm/uaccess_no.h b/arch/m68k/include/asm/uaccess_no.h
index a24cfe4a0d32..9651766a62af 100644
--- a/arch/m68k/include/asm/uaccess_no.h
+++ b/arch/m68k/include/asm/uaccess_no.h
@@ -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" \
--
2.26.2
Powered by blists - more mailing lists