From: Randy Dunlap <rdunlap@infradead.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org,
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, 2 Feb 2023 07:22:15 -0800 [thread overview]
Message-ID: <ed617e7e-c4ca-109b-fa1a-2ffe9bd8a355@infradead.org> (raw)
In-Reply-To: <CAMuHMdWPyTRh_E-jRET0zObm1+RYcPy0YrnVr-+ozEO84F0DWw@mail.gmail.com>
On 2/2/23 00:22, Geert Uytterhoeven wrote:
> Hi Arnd,
>
> On Thu, Feb 2, 2023 at 8:52 AM Arnd Bergmann <arnd@arndb.de> wrote:
>> 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.
>
> Which should already be there, or RSN:
> https://lore.kernel.org/all/167514181688.11863.771497291150527329.git-patchwork-notify@kernel.org
Good to see that. And thanks to both of you.
--
~Randy
prev parent reply other threads:[~2023-02-02 15:22 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
2023-02-02 8:22 ` Geert Uytterhoeven
2023-02-02 15:22 ` Randy Dunlap [this message]
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=ed617e7e-c4ca-109b-fa1a-2ffe9bd8a355@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.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®