[PATCH v2 0/3] ALSA: Fix compiler warnings in sound subsystem

wangdich9700@163.com posted 3 patches 1 week ago
sound/soc/fsl/fsl_easrc.c                   | 2 +-
sound/soc/mediatek/mt8189/mt8189-dai-adda.c | 2 --
sound/sparc/dbri.c                          | 2 ++
3 files changed, 3 insertions(+), 3 deletions(-)
[PATCH v2 0/3] ALSA: Fix compiler warnings in sound subsystem
Posted by wangdich9700@163.com 1 week ago
From: wangdicheng <wangdicheng@kylinos.cn>

This series fixes three compiler warnings in the sound subsystem,
covering both logical redundancies and a potential runtime bug.

Two categories of warnings are addressed:

1. "possible condition with no effect (if == else)" -- redundant
   conditional branches that produce identical code.

2. "do_div() does a 64-by-32 division" -- use of do_div() with
   a 64-bit divisor, which silently truncates the upper 32 bits.

Changes in v2:
- Dropped "ASoC: tlv320aic32x4: Use div64_ul for division by unsigned long".
  Per David's review, parent_rate is bounded by AIC32X4_MAX_PLL_CLKIN
  (20MHz) and will never exceed 32 bits, so do_div() is fine there.
- Updated patch 3 (fsl_easrc) commit message with concrete numerical
  proof that val1 can exceed 32 bits after >> 12, and clarified that
  the truncation happens when val1 is used as a divisor.

wangdicheng (3):
  ASoC: mediatek: mt8189: Remove redundant else-if branch with identical
    body
  ALSA: sparc/dbri: Fix "possible condition with no effect" warning
  ASoC: fsl_easrc: Use div64_u64 for 64-by-64 division

 sound/soc/fsl/fsl_easrc.c                   | 2 +-
 sound/soc/mediatek/mt8189/mt8189-dai-adda.c | 2 --
 sound/sparc/dbri.c                          | 2 ++
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.25.1
Re: (subset) [PATCH v2 0/3] ALSA: Fix compiler warnings in sound subsystem
Posted by Mark Brown 1 week ago
On Fri, 17 Jul 2026 17:15:39 +0800, wangdich9700@163.com wrote:
> ALSA: Fix compiler warnings in sound subsystem
> 
> From: wangdicheng <wangdicheng@kylinos.cn>
> 
> This series fixes three compiler warnings in the sound subsystem,
> covering both logical redundancies and a potential runtime bug.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/3] ASoC: mediatek: mt8189: Remove redundant else-if branch with identical body
      https://git.kernel.org/broonie/sound/c/fcf2a365da23
[3/3] ASoC: fsl_easrc: Use div64_u64 for 64-by-64 division
      https://git.kernel.org/broonie/sound/c/a46ccc71877e

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark