Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp189814rwo; Tue, 1 Aug 2023 15:20:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtoU46SHAaGoykOdgj+t72c40LZwxCyWVn4URDfuT8p1F+gQQj7fVnxa1F53/JUttCdb6R X-Received: by 2002:aa7:de0b:0:b0:522:2c36:4c59 with SMTP id h11-20020aa7de0b000000b005222c364c59mr3575851edv.4.1690928443840; Tue, 01 Aug 2023 15:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690928443; cv=none; d=google.com; s=arc-20160816; b=WzpOAa3PPRgwTm4UqKoAH/dp7+lmmxxofhBTW3blcxZ9tGmQ1QOdziWLu+WG0hQorc m5InoTaq4L6f+52pncW/V+9mtMPxJVvol2Fk3QXEQRIBRhEdhZSfuzJN0MAHLxXSXuNU T8huLG5hbw45qI+Mpg2T4f+wlvDdNAM3EBl3pDCYUDNVquGZ6E6HPzPf6cyAI1WGuHDy XzaQhLqDGE5odcsofaO81TT6tYnwnZDjY1+5j/Fy6xZXUwkmc96R+2mWdg2w9ePN9Ovh WZgrSz/2KmLQThwWprRUCd16GhRy+6k7zNA4HhabuV2gHjXitFv+hty6cp11NaFFWMzC fxpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=lvEgkaePU2xXJH+rWEFdSbgQ3ZqWwb5pL5D6ZyaI2j0=; fh=taQH2NodN5F7a/yRJbAbvoFDcYX2fcA5WfyKUG39xwk=; b=zduQ/O40hOd/7MKZq3zTKOsXMrc6t4rowqFZ1TcFdSLDEx0OPf69NpDZvKRhwdku0Q 8ktHBuzakmKPjQCXv3Y2US4MVuO9D5ZB5t/NS8PtXzIwHsbcqtb0lV7XSYCMOEVVVIrm zjVJW8Gv2HxgtT/t7WXNPkKLhTvjd8xpOuNUI9Vi/zTmj/5+TmCedLiniwCo78fr/dNX yGQY33u8/bta6dscA65LCzBROivLovjBrRqQNmTRrjiw8Pd7i+jl5qtmzlxfpe7F0dGH lAu3dBggpsH+LJh75YeDkzx7NgZDL6LXuvP+yQ5Ix+MuB4f+EKN3MxLZe2yKumvpm/IH sdqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=iGtkPoVZ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=w0pYD3bt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020aa7d78a000000b00522307b6ff7si8384035edq.428.2023.08.01.15.20.17; Tue, 01 Aug 2023 15:20:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=iGtkPoVZ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=w0pYD3bt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230159AbjHAUsb (ORCPT + 99 others); Tue, 1 Aug 2023 16:48:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbjHAUs2 (ORCPT ); Tue, 1 Aug 2023 16:48:28 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3BCA210A for ; Tue, 1 Aug 2023 13:48:25 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 34CC55C010E; Tue, 1 Aug 2023 16:48:25 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Tue, 01 Aug 2023 16:48:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1690922905; x=1691009305; bh=lv EgkaePU2xXJH+rWEFdSbgQ3ZqWwb5pL5D6ZyaI2j0=; b=iGtkPoVZ6BxzgcOK/f rIzRRQ5I48YDf6WrdyHqV44b3ju/6V6CsiPEVJKZw35fMhuozXh4jVtTbgn6cwPp rYvveaA0moJ0z6omEg1XPbtcZSbIVe8/THECtcRI0IpCVbD9VHpR6Xy9I3Ycfoax 2DtU/DdBYvf16oyTQebNm7m1u5zCcvi2Q32k8jMb00DnvqqY0epRjPueqOxr3tki WhVdieINb7iF6BNgVxkUczqp4D6QDqoJLERAgyT1d7MjGGNb9867bOd+YyGPzeq5 8WwFj+TpaXILOrKnN453cf0TuYMoypUUOvvnoxTsbymGFrC/btfzBg3/9FekTytg sc3A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1690922905; x=1691009305; bh=lvEgkaePU2xXJ H+rWEFdSbgQ3ZqWwb5pL5D6ZyaI2j0=; b=w0pYD3btqOcBUVNtgWdCi/28rVkG3 erB5YmAd+ayOhz/X/f0w4nBRjINyTbzoZB9wZuE+NlmJXbCAfFPW2wm4Uf1PnWMn AtBb9smtMMc52ZTVf201qsD1ZPbjK/ymv3IPlWFcXnwUo5FKGoeQoCDjr++uXCPn GrTK42NNfJYZeapPaVmNOKV/DWB+t5o50VpbjjSVOHll3ngKeU9EC6yn8WziVLMT 4BVAUA9mPTiRg6TvbeVL/tnyZSvxFXriqmDGTxtxcITOBJqPBrOEmSVJGo/y3Ia0 FeVhfpnhdpDS7y82KExkvD0rmMho8mC5bapMIywyQ6gVDinO6gryeGpxg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrjeeigdduhedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7571CB60089; Tue, 1 Aug 2023 16:48:24 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-592-ga9d4a09b4b-fm-defalarms-20230725.001-ga9d4a09b Mime-Version: 1.0 Message-Id: In-Reply-To: <20230801170315.GGZMk60zojZOeuUwX7@fat_crate.local> References: <20230725134837.1534228-1-arnd@kernel.org> <20230725134837.1534228-3-arnd@kernel.org> <20230801170315.GGZMk60zojZOeuUwX7@fat_crate.local> Date: Tue, 01 Aug 2023 22:48:02 +0200 From: "Arnd Bergmann" To: "Borislav Petkov" , "Arnd Bergmann" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, "Thomas Gleixner" , "Ingo Molnar" , "Dave Hansen" , "H. Peter Anvin" Subject: Re: [PATCH 2/5] [RESEND] x86: avoid unneeded __div64_32 function definition Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 1, 2023, at 19:03, Borislav Petkov wrote: > On Tue, Jul 25, 2023 at 03:48:34PM +0200, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The __div64_32() function is provided for 32-bit architectures that >> don't have a custom do_div() implementation. x86_32 has one, and >> does not use the header file that declares the function prototype, >> so the definition causes a W=1 warning: >> >> lib/math/div64.c:31:32: error: no previous prototype for '__div64_32' [-Werror=missing-prototypes] >> >> Define an empty macro to prevent the function definition from getting >> built, which avoids the warning and saves a little .text space. >> >> Signed-off-by: Arnd Bergmann >> --- >> arch/x86/include/asm/div64.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/arch/x86/include/asm/div64.h b/arch/x86/include/asm/div64.h >> index b8f1dc0761e4b..9826d5fc12e34 100644 >> --- a/arch/x86/include/asm/div64.h >> +++ b/arch/x86/include/asm/div64.h >> @@ -71,6 +71,8 @@ static inline u64 mul_u32_u32(u32 a, u32 b) >> } >> #define mul_u32_u32 mul_u32_u32 >> >> +#define __div64_32 /* not needed */ > > This comment, *after* having read the commit message makes sense. > > When you look at it alone, after having opened the file, makes me > scratch my head and wonder what is that thing supposed to mean. Please > extend it. > > And put the comment ontop, not sideways. Right, makes sense. How about this version? --- a/arch/x86/include/asm/div64.h +++ b/arch/x86/include/asm/div64.h @@ -71,6 +71,11 @@ static inline u64 mul_u32_u32(u32 a, u32 b) } #define mul_u32_u32 mul_u32_u32 +/* + * __div64_32() is never called on x86, so prevent the + * generic definition from getting built. + */ +#define __div64_32 #else # include Arnd