From nobody Mon Feb 9 05:53:22 2026 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 CBAC4C0015E for ; Thu, 3 Aug 2023 08:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234635AbjHCI3e (ORCPT ); Thu, 3 Aug 2023 04:29:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232170AbjHCI2m (ORCPT ); Thu, 3 Aug 2023 04:28:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0D533AB6 for ; Thu, 3 Aug 2023 01:26:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3402E61CC6 for ; Thu, 3 Aug 2023 08:26:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0034DC43391; Thu, 3 Aug 2023 08:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691051191; bh=fjxWdl9NmQdDwhM5ZKtH0mdm+UmjLs4KGMTSYInCLOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YeExSGNArapYCallEIwOX8qDGOPGJMI4G2dmUxh7c9DdfS75Ur5qdYJR8JBD91ihm ZXRv9YT8Al2voUbmcnhm7LWBPS7yEkAEBB0nr/k9pU2eKx3Lotp1SRVdTdu5z0WmBj p81RUKDKFk3UEaUbgfl5IBsMIoYAjqDfGoz8AoC0a/ALAma/6FZLx2wpVAvEQ5xW0l MTYe7vYOKuSn8s5iGdpJHBGp/FoTLS7D16o8/BozLBmmMzCVFg/RNx0s6rGNrhG+La QlERLC9JjmAFOX22dxWsST2nH2S5uYK2Z6CXASk6cpAeKp9Ls0kJnRseaZCQKLdQS+ 4zNXOTBP5eevg== From: Arnd Bergmann To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , linux-kernel@vger.kernel.org, x86@kernel.org, Arnd Bergmann Subject: [PATCH v3 3/7] x86: avoid unneeded __div64_32 function definition Date: Thu, 3 Aug 2023 10:26:15 +0200 Message-Id: <20230803082619.1369127-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230803082619.1369127-1-arnd@kernel.org> References: <20230803082619.1369127-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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=3D1 warning: lib/math/div64.c:31:32: error: no previous prototype for '__div64_32' [-Wer= ror=3Dmissing-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 --- v3: improve code comment --- arch/x86/include/asm/div64.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/asm/div64.h b/arch/x86/include/asm/div64.h index b8f1dc0761e4b..9931e4c7d73f3 100644 --- a/arch/x86/include/asm/div64.h +++ b/arch/x86/include/asm/div64.h @@ -71,6 +71,12 @@ static inline u64 mul_u32_u32(u32 a, u32 b) } #define mul_u32_u32 mul_u32_u32 =20 +/* + * __div64_32() is never called on x86, so prevent the + * generic definition from getting built. + */ +#define __div64_32 + #else # include =20 --=20 2.39.2