From patchwork Tue Jul 25 13:48:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 125652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2509213vqg; Tue, 25 Jul 2023 07:26:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlHLphYlT+Gb+PEhy7DXg2HHv0c+Eq42M+7nZQTxdTRD92+YB8Y9XN52LTqSj0qL9WzigjuP X-Received: by 2002:a17:902:a609:b0:1b9:de75:d5bb with SMTP id u9-20020a170902a60900b001b9de75d5bbmr14279065plq.7.1690295193197; Tue, 25 Jul 2023 07:26:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690295193; cv=none; d=google.com; s=arc-20160816; b=TXzYlxsmSVvysWNQt6nPNIO/ksJc4ZosUN3DMEuNxgIwYCFuTQTHYydtXbRC1kojnc 6rPgwfl+9BkginYpi/FBCQuJbK1Xq+tuJScKBmZFSHP+9299cjDzOYROwCTivO8ZvWdI l+fI3miNVIRLDheKqr5hkjLPTyQMQHhAifhWgcxnb7QUVbJlMUwEJfU+YaXL6KK120PA mEq8tSv4h2f8po80UAyETyn/JwRWxm0/NmQ9kzIXNYdTK6YYV2ctZSFPH3m2eUPyZxOM oyEGT0vdCbb0GflEneD7qPQggzxI4atAbOvBvWT+yIVh7fAlsBjhH+PgM7bGxigP9gBj kBkA== 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=DbK5jx3TdIjIeKj44d7qh47lS9C9C5DVRxUFx+zjI2g=; fh=R523ZnP4N7O48iGEbgKYBfM0eoofLeWRxo/bWq35Los=; b=S0iMAbZ2TKIyDxI1FWmNQrj5tj5zF+YnIUZCkpOhhP+Gsd+UQe2A1j+nfu9e0JJs/Z JC5fjXONMGLutXCqK7yxMHAzTdJEViim+qXvvOAytv4zJ0Ovv/W48ojoIhyE5VGBEAtK mjN6t7LgsS05SpZ2r28P4z5lUKQEx2h4N1zlHhawvHL8iv8lzueISwMLHygApIP+snAY Z19YpqipiB/WQxlte8aiFoQw6muAJNWsheZEhGlJhvhyf03BXZJELscRMCR1C0QfhKIz 5Hd6vOFXqiSGXXXfSnY1Rpl6mJU9Nvn9u7w56TwX3yPkXMdhGFbjgrkndyAg3dooLh15 z+zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SFLrP4GF; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a170902da8800b001b8946f3f95si12020830plx.312.2023.07.25.07.26.19; Tue, 25 Jul 2023 07:26:33 -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=SFLrP4GF; 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 S231679AbjGYNtC (ORCPT + 99 others); Tue, 25 Jul 2023 09:49:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231599AbjGYNs6 (ORCPT ); Tue, 25 Jul 2023 09:48:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78A531FD0 for ; Tue, 25 Jul 2023 06:48:53 -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 C5BB46171E for ; Tue, 25 Jul 2023 13:48:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 609C0C433CA; Tue, 25 Jul 2023 13:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690292932; bh=v5mmMDcLa9Qz+qTohnDO/9Jf2svRDFSXLGnLYI1Fcc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SFLrP4GFqOQh1yYxfBN3ODV9bJRXnvbtT/GzhtfnMr9ePZxfUcUQ5Tpbu6wCPpWiv DEWidaqarR3eOw48om02/LZ0u+9Rm8NttxomDfeRglYP1kAkaxYz8U7vwU952avJxp 0z4EZWQHx9tE+V6WXJWWFalOHebK3xkhBjtd+p7wxI3Nz22nLbokLkXvbWjdjuZ6zX bgiBdi+0YLD8sUs2wGrHHeDRn18ppYuUEwtRBChFKIc+vtRklup8j10Wj6oeDl6/vG WnGaZP7eTI80FgbsesszEcFL11NNEu0hhaHcJNQsehnI1n5xnpbjlio1NAwdRNFEdd QQjkIiZqz2AyA== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH 2/5] [RESEND] x86: avoid unneeded __div64_32 function definition Date: Tue, 25 Jul 2023 15:48:34 +0200 Message-Id: <20230725134837.1534228-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230725134837.1534228-1-arnd@kernel.org> References: <20230725134837.1534228-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772402972844053750 X-GMAIL-MSGID: 1772402972844053750 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 */ + #else # include