From: "Arnd Bergmann" <arnd@arndb.de>
To: "Randy Dunlap" <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: "Alexander Viro" <viro@zeniv.linux.org.uk>,
"Yoshinori Sato" <ysato@users.sourceforge.jp>,
"Rich Felker" <dalias@libc.org>,
linux-sh@vger.kernel.org,
"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] sh: implicit access_ok() needs an #include
Date: Thu, 02 Feb 2023 08:45:29 +0100 [thread overview]
Message-ID: <980912a0-f5a0-4dea-9b5b-565d05bc4a6c@app.fastmail.com> (raw)
In-Reply-To: <20230202053113.2782-1-rdunlap@infradead.org>
On Thu, Feb 2, 2023, at 06:31, Randy Dunlap wrote:
> Building arch/sh/ has a build error/warning that is fixed by
> adding an #include of a header file.
>
> ../arch/sh/include/asm/checksum_32.h: In function
> 'csum_and_copy_from_user':
> ../arch/sh/include/asm/checksum_32.h:53:14: error: implicit declaration
> of function 'access_ok' [-Werror=implicit-function-declaration]
> 53 | if (!access_ok(src, len))
> | ^~~~~~~~~
>
> Fixes: 7fe8970a78a1 ("sh32: convert to csum_and_copy_from_user()")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: linux-sh@vger.kernel.org
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> v2: add Subject: and patch description
Thanks for the fix!
>
> arch/sh/include/asm/checksum_32.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff -- a/arch/sh/include/asm/checksum_32.h b/arch/sh/include/asm/checksum_32.h
> --- a/arch/sh/include/asm/checksum_32.h
> +++ b/arch/sh/include/asm/checksum_32.h
> @@ -7,6 +7,7 @@
> */
>
> #include <linux/in6.h>
> +#include <asm-generic/access_ok.h>
This will work correctly, but it is not the intended usage of the
header. Anything in asm-generic/*.h should only be included by
a particular header, usually the asm/*.h with the same name or in this
case the asm/uaccess.h header.
I think the correct fix here is to include asm/uaccess.h instead
of asm-generic/access_ok.h.
Arnd
next prev parent reply other threads:[~2023-02-02 7:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 5:31 Randy Dunlap
2023-02-02 7:45 ` Arnd Bergmann [this message]
2023-02-02 8:22 ` Geert Uytterhoeven
2023-02-02 15:22 ` Randy Dunlap
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=980912a0-f5a0-4dea-9b5b-565d05bc4a6c@app.fastmail.com \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=dalias@libc.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=viro@zeniv.linux.org.uk \
--cc=ysato@users.sourceforge.jp \
/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®