Commit 25d2cae4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Geert Uytterhoeven

m68k: Use BUILD_BUG for passing invalid sizes to get_user/put_user

Simplify the handling a bit by using the common helper instead of
referencing undefined symbols.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Link: https://lore.kernel.org/r/20210916070405.52750-4-hch@lst.deSigned-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent c4f607c3
...@@ -39,9 +39,6 @@ static inline int access_ok(const void __user *addr, ...@@ -39,9 +39,6 @@ static inline int access_ok(const void __user *addr,
#define MOVES "move" #define MOVES "move"
#endif #endif
extern int __put_user_bad(void);
extern int __get_user_bad(void);
#define __put_user_asm(res, x, ptr, bwl, reg, err) \ #define __put_user_asm(res, x, ptr, bwl, reg, err) \
asm volatile ("\n" \ asm volatile ("\n" \
"1: "MOVES"."#bwl" %2,%1\n" \ "1: "MOVES"."#bwl" %2,%1\n" \
...@@ -105,8 +102,7 @@ asm volatile ("\n" \ ...@@ -105,8 +102,7 @@ asm volatile ("\n" \
break; \ break; \
} \ } \
default: \ default: \
__pu_err = __put_user_bad(); \ BUILD_BUG(); \
break; \
} \ } \
__pu_err; \ __pu_err; \
}) })
...@@ -179,8 +175,7 @@ asm volatile ("\n" \ ...@@ -179,8 +175,7 @@ asm volatile ("\n" \
break; \ break; \
} \ } \
default: \ default: \
__gu_err = __get_user_bad(); \ BUILD_BUG(); \
break; \
} \ } \
__gu_err; \ __gu_err; \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment