Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1974584rwo; Thu, 3 Aug 2023 02:52:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlFI3j5dLFwC9aPKwnxSsfOzSX/elodaALMHxmDN9gXzNCs54aIb/vquA+tO4UzIBSKYrEb1 X-Received: by 2002:a05:6a20:394d:b0:134:a4e2:4ac8 with SMTP id r13-20020a056a20394d00b00134a4e24ac8mr19201612pzg.39.1691056376680; Thu, 03 Aug 2023 02:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691056376; cv=none; d=google.com; s=arc-20160816; b=wlwZ41buTteFEvKw/mgUF6/kjk04tGi9wR6JkO9Chv1JP2PhUD7f4kLPs7hbqOFsou brBQm90DmNU8aCaO7YZFfXPZQSGSVGMjLldOEAQjqgDyLcJl2KF4cNVKU+mipqDtrYjX 8aY13TjxAgl6nPqctXxV1biE4NqgqTY7NViuGZ559yN0P9gkSo/iH+5btCMgSMiW1iXQ KQ2Rna/7GFjrfpLOlcFTLqLh9uZflmv2KIcBY9Lk+nyxZGAAVuGg0mitcgzKBaHYR2XF ND4DVTV9m4SgjAZw18TjtRgqMWTNBfCCcmJZJjhuxtstVyxPMbri7cxvL5L6y3Ym/t2C PgqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=btFWI0zlHV8j80+3yx+BXG/g2UPB3HEbVCzAkBo40no=; fh=3/4MDyH/knLuYntRya8npu0ASABjtXXSBg4oxzp1prM=; b=WI9SJPkI5268xtvzcEuhM7T7moj27pZOz+P4r5eRIib9nucV7hKpvMEMwRR40YtVpd MdmNC1kw3MjXM1AbDQR+sryT0P/+T/wzpMoNQtigjAP/OP5YtjFCRx+u6yUXuqM8CcXL VSpZGioLYrAApwUWmRWHtarGTdyWAMbZfkYXcRsgFgsJrzPB+sfqW1rbvxLtSEGPfCba kjhf2nacl/h+x26TsE9OuBNKeYwc9RY/jJ/L43F9VGpn2mbtRDMf1gmLiLkrmvA1l4U2 PoYcxWAPJwPMmvq88kOS5DAgiDZvLITEjGpT6eJRXRy30UzdqLh4tVUCanI4PDMQUYZc WYOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YeExSGNA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y25-20020a056a001c9900b006878b4cb984si949311pfw.36.2023.08.03.02.52.44; Thu, 03 Aug 2023 02:52:56 -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=@kernel.org header.s=k20201202 header.b=YeExSGNA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234633AbjHCI3a (ORCPT + 99 others); Thu, 3 Aug 2023 04:29:30 -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: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 --- 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 +/* + * __div64_32() is never called on x86, so prevent the + * generic definition from getting built. + */ +#define __div64_32 + #else # include -- 2.39.2