From: Christoph Hellwig <hch@lst.de>
To: arnd@arndb.de
Cc: palmerdabbelt@google.com, linux-arch@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: [PATCH] asm-generic: mark __{get,put}_user_fn as __always_inline
Date: Tue, 27 Oct 2020 09:50:17 +0100 [thread overview]
Message-ID: <20201027085017.3705228-1-hch@lst.de> (raw)
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>
---
include/asm-generic/uaccess.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index 45f9872fd74759..4973328f3c6e75 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));
--
2.28.0
next reply other threads:[~2020-10-27 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 8:50 Christoph Hellwig [this message]
2020-10-27 15:14 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201027085017.3705228-1-hch@lst.de \
--to=hch@lst.de \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=palmerdabbelt@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®