summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-10-27 09:50:17 +0100
committerArnd Bergmann <arnd@arndb.de>2020-10-27 16:13:09 +0100
commit0bcd0a2be8c9ef39d84d167ff85359a49f7be175 (patch)
tree5cf4d680c266eb2d6409003f890ed185a16d1dce /include/asm-generic
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff)
asm-generic: mark __{get,put}_user_fn as __always_inline
Without the explicit __always_inline, some RISC-V configs place the functions out of line, triggering the BUILD_BUG_ON checks in the function. Fixes: 11129e8ed4d9 ("riscv: use memcpy based uaccess for nommu again") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/uaccess.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index 45f9872fd747..4973328f3c6e 100644
--- a/include/asm-generic/uaccess.h
+++ b/include/asm-generic/uaccess.h
@@ -12,7 +12,8 @@
#ifdef CONFIG_UACCESS_MEMCPY
#include <asm/unaligned.h>
-static inline int __get_user_fn(size_t size, const void __user *from, void *to)
+static __always_inline int
+__get_user_fn(size_t size, const void __user *from, void *to)
{
BUILD_BUG_ON(!__builtin_constant_p(size));
@@ -37,7 +38,8 @@ static inline int __get_user_fn(size_t size, const void __user *from, void *to)
}
#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
-static inline int __put_user_fn(size_t size, void __user *to, void *from)
+static __always_inline int
+__put_user_fn(size_t size, void __user *to, void *from)
{
BUILD_BUG_ON(!__builtin_constant_p(size));