Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2323709rwd; Fri, 16 Jun 2023 02:19:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+Gsj4ZAmEDcUdDP+vK+vqe8o4qW8u/4of9Sqk9E/G/SazL7HWbB+wKJOlvLhCZ9MPO9C+ X-Received: by 2002:a17:902:fa8d:b0:1b0:7739:657a with SMTP id lc13-20020a170902fa8d00b001b07739657amr1026739plb.50.1686907180983; Fri, 16 Jun 2023 02:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686907180; cv=none; d=google.com; s=arc-20160816; b=PmBFfLhy0JdvDMbn85HhTQ0LH0nwdTnGkt/MymqWzuRuOt6Z4w6uq6mHoHCMM1jBgZ /mDWj1ASC7MLIzDRNYV+wOro0WkcjT7zWY1zFybwYAdkpAjmvTuBPNyawN7NYbhOc3Rs 9tQ35tNteDtmB6slDFnOgU0Hvw3+zC2CqI0FR8faFd/ExD/Jb48FA03QIjKPz5eq7Cu3 Yqp4Nbtw7UwfKhg3snsvWFFGoz49nxbDRvw8Q9Sd+MLJlrK7Kfd9YiMgwNpdrUKYdH/0 FPxq5amVtFlTI0CTbd90OF5SzQiqynPwCBcujpmG47xr7zoHwtyI/Ki3R0O/xFlPhWB4 cQ5g== 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=SRpAJ4VT0kgCC2zUlp9Wl0zitA63DAujJz5tUvTx1NA=; b=yQx8j+9gTyCOVYw3m4gdJzPznDeWpIVhCRqxc9OSVAAZEjSe+A6etAbjYfi6TXi418 rX6ktLBignMFG2Zq3jGoH1eYqM5QoYWvbrsx2aFbjkjBVqUaxeGKA9mbpbAS5nK+nIai Y8hMlKCO0E373UmO9hEf+1hN0OPLGmgZXek/001wlfSPimrD1WDqChgbHwbhY5t6JMKg ezFHR7/jX0AmJwpRIm+I7ydD2nfwADuVuFM+zx9+Y7tHImX5oFk9eSc71fEPFw5PZzjd I82ih2kMr6F6KsEQhjTPGPTRgNa4o5P1dme+eiiPPWouFu88/oMIPOYh3WKGn3HLOka2 6eiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iJXuogqa; 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 c11-20020a170902d48b00b001b18ca910e1si7687817plg.163.2023.06.16.02.19.26; Fri, 16 Jun 2023 02:19:40 -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=iJXuogqa; 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 S245537AbjFPJFs (ORCPT + 99 others); Fri, 16 Jun 2023 05:05:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230318AbjFPJFG (ORCPT ); Fri, 16 Jun 2023 05:05:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7330A3592 for ; Fri, 16 Jun 2023 02:02:49 -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 D195D614F1 for ; Fri, 16 Jun 2023 09:02:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4186AC433C0; Fri, 16 Jun 2023 09:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686906157; bh=42cOD8sz+eZUMd05BlQRxt1PSMlj4opjLa8x0yA5QWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJXuogqaG3pv8w5YBkzuy6w/IMARU40BcnF+lxrWkGc/JB4SdZjvJJOcZdkV4p2Ik vu0A4ay0HhMJPCfnUvyg5jEWm9IyaNmk9Syv+COU4crsF5D984lMHNJo/n3vdnSoen y9sT1rAPEjXpIkhFkx8r02RxTDNh6ACIptapPE7+7Muf8D6GKpV18zNnrYtzCltXU9 /MkJd0fXODF6REfxs6R5/SnxPtIAobq/BQec2KAeJojrAjtzE+DNjLOQxiiUTFrUL6 iawgZ8PNzdctrsWcXopE0hKxjHT3hgio17OiHDV0Xdou4BaNHXH3FikiJMX8IRpYs3 dpahOeAN2yxCA== From: Arnd Bergmann To: Mark Brown Cc: Arnd Bergmann , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Yingkun Meng , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] ASoC: loongson: fix compile testing on 32-bit Date: Fri, 16 Jun 2023 11:00:40 +0200 Message-Id: <20230616090156.2347850-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230616090156.2347850-1-arnd@kernel.org> References: <20230616090156.2347850-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Arnd Bergmann DIV_ROUND_CLOSEST() does not work on 64-bit variables when building for a 32-bit target: ld.lld: error: undefined symbol: __udivdi3 >>> referenced by loongson_i2s.c >>> sound/soc/loongson/loongson_i2s.o:(loongson_i2s_hw_params) in archive vmlinux.a Use DIV_ROUND_CLOSEST_ULL() instead. Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support") Signed-off-by: Arnd Bergmann --- sound/soc/loongson/loongson_i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/loongson/loongson_i2s.c b/sound/soc/loongson/loongson_i2s.c index f73b6d6f16c23..b919f0fe83615 100644 --- a/sound/soc/loongson/loongson_i2s.c +++ b/sound/soc/loongson/loongson_i2s.c @@ -89,7 +89,7 @@ static int loongson_i2s_hw_params(struct snd_pcm_substream *substream, bclk_ratio = DIV_ROUND_CLOSEST(sysclk, (bits * chans * fs * 2)) - 1; mclk_ratio = clk_rate / sysclk; - mclk_ratio_frac = DIV_ROUND_CLOSEST(((u64)clk_rate << 16), + mclk_ratio_frac = DIV_ROUND_CLOSEST_ULL(((u64)clk_rate << 16), sysclk) - (mclk_ratio << 16); regmap_read(i2s->regmap, LS_I2S_CFG, &val); -- 2.39.2