Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3578739rwd; Fri, 16 Jun 2023 21:26:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5g/qAro51Q4so8x5NWKECb+UMV7EZZA0vozQa3jnUUZZ04J1hRnRPZAVt38jb91L3YMVBI X-Received: by 2002:a05:6870:3044:b0:19f:45a1:b5a2 with SMTP id u4-20020a056870304400b0019f45a1b5a2mr1652174oau.49.1686976014066; Fri, 16 Jun 2023 21:26:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686976014; cv=none; d=google.com; s=arc-20160816; b=yKmTVqmcD+0aB2v3xQBb4blFu5K4dV0P+Tld+uguHvv3ka57Z7wx/t78xrSsL4e3Oy CkcBgAfv/OAxW4yRVOW5ZflKYipOH7viQEu1qDO2EebBF9A8sSpL9zf4Iniu4e1L39sX ODHD0I/B0LLqJjnddsESAgdVWJ/xBKYSrAyL2diMaV+G8JhDmP62ZBfsTSuRRBIWrOsb wto6zWcC00mbXH3p2ize+rQfvDUD3M+FYPsMM36F6XJGJaY7soI2R/u6lIOrGzRiuyfQ 7GFQxYurD5t/7ZQIhC2l3RbFpx0PTO8QpTQerlGpAAvWvAca7LHBMF5FllIqf9npNYD7 HbTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Xc8SGiacXIIcceBTgiX4PD/KvWxsk0L8WaZj35J7Ce8=; b=xQTIZFjyhy7HJGgQBuNZFD04aaO/ZsJnMVh1BEzGvR1BnRbo82j7/ICTDLcVWnSzLJ yY7xpPWFigpK0VHHpbM4N5I0lTJMt5kqTO6bGuMH810uV9Exzg4K0wnmyDDpVGNqRkKj ej0LkrlV18gB8WMDGG9JSlgMdjwFzkvmxgBZU1+7lqZ8qMANOeyGjIiS3LvmwRjMXG7q 7+QIFBswdC5ELlNhaaeG7BJpKiJBDU/GoeO6dks3uFWdOLugc0z3lpmOJRYgGYR/BqUT 9wez2reYgtNGqlhvTKNdhsEvf4OdY7YdEgwfZX/Z8TurVrM1lSssvzjy6/ozas2wz8Zz Z7mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=TCi1P+N+; 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 q30-20020a638c5e000000b005533e84b286si3131107pgn.328.2023.06.16.21.26.36; Fri, 16 Jun 2023 21:26:54 -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=@infradead.org header.s=bombadil.20210309 header.b=TCi1P+N+; 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 S229739AbjFQEHA (ORCPT + 99 others); Sat, 17 Jun 2023 00:07:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbjFQEG6 (ORCPT ); Sat, 17 Jun 2023 00:06:58 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35170B3 for ; Fri, 16 Jun 2023 21:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=Xc8SGiacXIIcceBTgiX4PD/KvWxsk0L8WaZj35J7Ce8=; b=TCi1P+N+9nRjJGIQD2ds9w3y81 Z3cdSlXp2Ba0z2eiyYeGfjbJiWXGqADpEnWyVM/cGctV9eL2OzEjL5V953Bxi6r87Y8DpCe0eQYTu NeFcMgI9zzBzuaHKLwLjnN5r42Bdcq7lk/5/KB8uOKhMnuSU+MSXo9jkkJ+RbLa9I0+4ksXJvKa0b UED7pFM6q1ztzEgwcQPqDR6dxMfj6dJP9nXuwwpBgKo2Hu8FMcKqpJPwlXOnJqqtnUjj6+MNA7jgO l8DT/Jlyzirh8ilW2llTjKU2OGCwLPMxrjyZBPNdoMYg/8NT2Og39hlufspo0gtH4sJvM1qMUeWvM rgvyIPMA==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qANCw-002f8f-15; Sat, 17 Jun 2023 04:06:38 +0000 Message-ID: <48ddb551-496f-f4e7-96dc-30f250f97438@infradead.org> Date: Fri, 16 Jun 2023 21:06:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH 4/4] ASoC: loongson: fix compile testing on 32-bit Content-Language: en-US To: Arnd Bergmann , Mark Brown Cc: Arnd Bergmann , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Yingkun Meng , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20230616090156.2347850-1-arnd@kernel.org> <20230616090156.2347850-4-arnd@kernel.org> From: Randy Dunlap In-Reply-To: <20230616090156.2347850-4-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 6/16/23 02:00, Arnd Bergmann wrote: > 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 Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Thanks. > --- > 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); -- ~Randy