Skip to content

ALSA: Fix compiler warnings in sound subsystem

[email protected] linux-sound lkml stable 2 versions Applied

Status from this message: Applied to for-next branch. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesApplied
  2. v14 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3ASoC: mediatek: mt8189: Remove redundant else-if branch with identical bodysound/soc/mediatek/mt8189/mt8189-dai-adda.c+0 -20 replies
2/3ALSA: sparc/dbri: Fix "possible condition with no effect" warningsound/sparc/dbri.c+2 -01 reply
3/3ASoC: fsl_easrc: Use div64_u64 for 64-by-64 divisionsound/soc/fsl/fsl_easrc.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

From: wangdicheng <[email protected]>

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(-)
Signature · 1 line
2.25.1