Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>,
	Chen Wang <unicorn_wang@outlook.com>,
	 Inochi Amaoto <inochiama@gmail.com>,
	"Anton D. Stavinskii" <stavinsky@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-sound@vger.kernel.org,  sophgo@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] ASoC: sophgo: fix 64-bit division build failure
Date: Mon, 02 Feb 2026 23:04:40 +0100	[thread overview]
Message-ID: <ac21f40fb56a8cc40c7716cb059b9acd0c0bcc5b.camel@gmail.com> (raw)
In-Reply-To: <20260202215956.2127414-1-arnd@kernel.org>

On Mon, 2026-02-02 at 22:59 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> cv1800b_adc_setbclk_div() does four 64-bit divisions in a row, which
> is rather inefficient on 32-bit systems, and using the plain division
> causes a build failure as a result:
> 
> ERROR: modpost: "__aeabi_uldivmod" [sound/soc/sophgo/cv1800b-sound-adc.ko] undefined!
> 
> As the input value is actually a 32-bit integer, just change the type
> of the temporary value as well.
> 
> Fixes: 4cf8752a03e6 ("ASoC: sophgo: add CV1800B internal ADC codec driver")
> Suggested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  sound/soc/sophgo/cv1800b-sound-adc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/sophgo/cv1800b-sound-adc.c b/sound/soc/sophgo/cv1800b-sound-adc.c
> index 794030b713e9..de1c77014c2f 100644
> --- a/sound/soc/sophgo/cv1800b-sound-adc.c
> +++ b/sound/soc/sophgo/cv1800b-sound-adc.c
> @@ -100,7 +100,7 @@ static int cv1800b_adc_setbclk_div(struct cv1800b_priv *priv, unsigned int rate)
>  {
>  	u32 val;
>  	u32 bclk_div;
> -	u64 tmp;
> +	u32 tmp;
>  
>  	if (!priv->mclk_rate || !rate)
>  		return -EINVAL;
> @@ -117,7 +117,7 @@ static int cv1800b_adc_setbclk_div(struct cv1800b_priv *priv, unsigned int rate)
>  	}
>  
>  	if (tmp > 256) {
> -		dev_err(priv->dev, "BCLK divider %llu out of range\n", tmp);
> +		dev_err(priv->dev, "BCLK divider %u out of range\n", tmp);
>  		return -EINVAL;
>  	}
>  

-- 
Alexander Sverdlin.

  reply	other threads:[~2026-02-02 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 21:59 [PATCH] [v2] ASoC: sophgo: fix 64-bit division build failure Arnd Bergmann
2026-02-02 22:04 ` Alexander Sverdlin [this message]
2026-02-03 10:59 ` Mark Brown

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=ac21f40fb56a8cc40c7716cb059b9acd0c0bcc5b.camel@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=inochiama@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=sophgo@lists.linux.dev \
    --cc=stavinsky@gmail.com \
    --cc=unicorn_wang@outlook.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