From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D634C05027 for ; Thu, 2 Feb 2023 15:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232118AbjBBPWc (ORCPT ); Thu, 2 Feb 2023 10:22:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231614AbjBBPW3 (ORCPT ); Thu, 2 Feb 2023 10:22:29 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3D4B22798; Thu, 2 Feb 2023 07:22:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=9oOxos7ZA6TGusK+7tBr/VRDF4lwgh3CYWYUksgrt8Y=; b=p6wz6eR0yP3QuKyu63HEk27AiP eKJbFwjoa01zxVVXBk0BO9BrbUX7TIYxztkcEnxNvC+MfG35vdG72Mdh6L6EKu3R2n1MPUEM5YDKY 0qc/jVohvK5DR4iVsUwro3IDRMSoS689LNEBEJV9EJrxMcRnJPh5vCFrktxgMiw04QgcRhhhlU8k4 oXu8wzeIxTPFXXWCH59eAEi22qT5sWPy/QvoRTqZqQ2t5OgZ60qn1xiZBceB1LJ12bpAhhi8gyHTl 2H3XCptZqQgXcv5idfXwqxcQDQGWhXR0jUYiX8RBSIcdmAOrIw+jjSN3hsyn1ygFt04H7KWwMcKkR 3hI5FaFQ==; Received: from [2601:1c2:d00:6a60::9526] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNbPk-00GJuW-Uc; Thu, 02 Feb 2023 15:22:17 +0000 Message-ID: Date: Thu, 2 Feb 2023 07:22:15 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2] sh: implicit access_ok() needs an #include Content-Language: en-US To: Geert Uytterhoeven , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, Alexander Viro , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, John Paul Adrian Glaubitz , Andrew Morton References: <20230202053113.2782-1-rdunlap@infradead.org> <980912a0-f5a0-4dea-9b5b-565d05bc4a6c@app.fastmail.com> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/23 00:22, Geert Uytterhoeven wrote: > Hi Arnd, > > On Thu, Feb 2, 2023 at 8:52 AM Arnd Bergmann 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 >>> Cc: Al Viro >>> Cc: Yoshinori Sato >>> Cc: Rich Felker >>> Cc: linux-sh@vger.kernel.org >>> Cc: John Paul Adrian Glaubitz >>> Cc: Arnd Bergmann >>> Cc: Andrew Morton >>> --- >>> 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 >>> +#include >> >> 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