[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200528202514.27175-2-luc.vanoostenryck@gmail.com>
Date: Thu, 28 May 2020 22:25:13 +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 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