From: Arnd Bergmann <arnd@kernel.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Sheetal <sheetal@nvidia.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-sound@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: tegra: fix build regression 32 bit kernels
Date: Fri, 8 May 2026 10:00:25 +0200 [thread overview]
Message-ID: <20260508080031.4064272-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
Compile-testing this driver for 32-bit causes a build failure:
x86_64-linux-ld: sound/soc/tegra/tegra210_mixer.o: in function `tegra210_mixer_configure_gain':
tegra210_mixer.c:(.text+0x709): undefined reference to `__udivdi3'
As the driver is only actually used on 64-bit Tegra210, rework the
division to use the div_u64() helper that avoids the libgcc call.
Fixes: 36645381b864 ("ASoC: tegra: Add per-stream Mixer Fade controls")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/tegra/tegra210_mixer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c
index f05617b5f433..d21f55dad0e3 100644
--- a/sound/soc/tegra/tegra210_mixer.c
+++ b/sound/soc/tegra/tegra210_mixer.c
@@ -157,8 +157,8 @@ static int tegra210_mixer_configure_gain(struct snd_soc_component *cmpnt,
if (i == DURATION_N3_ID)
val = mixer->duration[id];
else if (i == DURATION_INV_N3_ID)
- val = (u32)(BIT_ULL(31 + TEGRA210_MIXER_PRESCALAR) /
- mixer->duration[id]);
+ val = div_u64(BIT_ULL(31 + TEGRA210_MIXER_PRESCALAR),
+ mixer->duration[id]);
else
val = gain_params.duration[i];
}
--
2.39.5
next reply other threads:[~2026-05-08 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 8:00 Arnd Bergmann [this message]
2026-05-08 10:02 ` [PATCH] ASoC: tegra: fix build regression 32 bit kernels Thierry Reding
2026-05-08 12:51 ` Mark Brown
2026-05-08 13:23 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260508080031.4064272-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sheetal@nvidia.com \
--cc=thierry.reding@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox