From nobody Sat Jul 25 05:29:19 2026 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBD3939C006; Fri, 17 Jul 2026 09:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.2 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784279765; cv=none; b=S26tL6fsZRRMlsQgyPg4thTlEeRhXBoysOFhFPgukqmmeC/93WLG+w9eIfl9lqFQt7PMw4iHH5lvSECWcbIPFZJDczjPwbhO3vch5FlWsiGLzGVGYy7zzLR3NCFGItGt+Jb/9K7x3h79BfjqYDY+ei4tmamTkcFSn5Ehv5h//fc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784279765; c=relaxed/simple; bh=xdvhUl3fj3vEiBXcstZ+fMXyE6rnuAmvayHvcz1W3Ag=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qqixcUyMsTsDX6zCvEIEv1gpU15eaGHxIBiSOGd7oY7WgHaP9lNzDiKw1uozhwrDyux5jALHZVsCxafCVpIad5P6BmoIDUX87a+bjU3puUxSVaTzUWJg20kl1muYCCTUxtDYZUurcjd4yfReR36B+6j/nwggSlCOnJGl2hk/VTs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=lB6zBQc0; arc=none smtp.client-ip=117.135.210.2 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="lB6zBQc0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=S0 B2VIO/6GVhMCL+cF6jfDnuUFJWU0nTzUHZodUQqxI=; b=lB6zBQc0s8pWP4aBAN D+M8t9nzK+RjySrqoaO8RTCzAGvCACNOKw3W3v6UTUrYyeKRzqhfS7nWCrOkrSsx f4KEJKA7432pGlt9QyC9oFn/LyHVZlRmNJO9R6GdtvDk2uM26zlnVSwp55UHQBxm GLLOxa5Rds8Ahc/VIQk7fYn+g= Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g0-0 (Coremail) with SMTP id _____wD3jTm_8llqT1CgJA--.17062S3; Fri, 17 Jul 2026 17:15:46 +0800 (CST) From: wangdich9700@163.com To: tiwai@suse.de, david.laight.linux@gmail.com, wangdich9700@163.com Cc: wangdicheng@kylinos.cn, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] ASoC: mediatek: mt8189: Remove redundant else-if branch with identical body Date: Fri, 17 Jul 2026 17:15:40 +0800 Message-Id: <20260717091542.721877-2-wangdich9700@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260717091542.721877-1-wangdich9700@163.com> References: <20260717091542.721877-1-wangdich9700@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wD3jTm_8llqT1CgJA--.17062S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7Ww4kXrW5XF17GFyDWr45Wrg_yoW8JFWfpr s0kFZrAFW3Jr4rJF4ktw10kF1Utr1fZF98C34fXw1jy3s8Jr4IgFZ0v342krW8tF9rKF95 Wr1qg34DGry5ta7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zEjXd7UUUUU= X-CM-SenderInfo: pzdqwv5lfkmliqq6il2tof0z/xtbCvwLdLWpZ8sL2bwAA3X Content-Type: text/plain; charset="utf-8" From: wangdicheng Fix a compiler warning about a condition with no effect: sound/mediatek/mt8189/mt8189-dai-adda.c:388:7-9: WARNING: possible conditio= n with no effect (if =3D=3D else) The MTKAIF_PROTOCOL_2 branch and the else branch both write the same value 0xB0 to AFE_AUD_PAD_TOP_CFG0, making the else-if condition meaningless. Remove the redundant branch. Signed-off-by: wangdicheng --- sound/soc/mediatek/mt8189/mt8189-dai-adda.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/mediatek/mt8189/mt8189-dai-adda.c b/sound/soc/mediat= ek/mt8189/mt8189-dai-adda.c index ad5b9546ff63..5c41a6386204 100644 --- a/sound/soc/mediatek/mt8189/mt8189-dai-adda.c +++ b/sound/soc/mediatek/mt8189/mt8189-dai-adda.c @@ -385,8 +385,6 @@ static int mtk_adda_pad_top_event(struct snd_soc_dapm_w= idget *w, if (event =3D=3D SND_SOC_DAPM_PRE_PMU) { if (afe_priv->mtkaif_protocol =3D=3D MTKAIF_PROTOCOL_2_CLK_P2) regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB8); - else if (afe_priv->mtkaif_protocol =3D=3D MTKAIF_PROTOCOL_2) - regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB0); else regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB0); } --=20 2.25.1 From nobody Sat Jul 25 05:29:19 2026 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5FA43909B5; Fri, 17 Jul 2026 09:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784279765; cv=none; b=E9xojBRRyo9Z64OtPD9NAur7s318LDhdb+RZDLnl5JD6VJxQWAvw0efR/6YSzj9lcCH8ggjZWefJooDFTf7z4grm7TKILnpg29dJiPuKahjeuNRO7uKJWfcavIUIKJh/HOutxd1amJ3oRMAsuLHeG0UxST8pQvkKaeVc0GM6COw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784279765; c=relaxed/simple; bh=FIRI9OP4oNPaSmPWGYfIzU5Dt4NyB63dz/qmvRY7u5U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ulRMXiuXgM6/XWpce6ddygSJNmnhQdnbySuWR4jNa5f0wBAnO3R9aJ0t3I67Lc6M6zubtErv0rFP0ueINl6r1npEx9FzCYIZNbgKGPcs7egvUmmSJowQigF7k7dibvgZdYoZggxWRKbadGR8cOA4aUwjFtEuasZFtzxKrIbG9Mg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=NMxAbPl3; arc=none smtp.client-ip=117.135.210.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="NMxAbPl3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=ng xbpgJeDPukXv4+x+vEG0dkbkEZhuzH7wGI/Wnfk9s=; b=NMxAbPl3cFnuLdv7WV rmLLrveqSvRoSeQi1yIm0fVqR62rAgKj0N49LSrRq8v7Ov7hS+K46+Ng4mIGaR1N nScSGFCwVndxYNyvGZzkzPYPNseowVJ/AkYlsDlNKkHMDBSdzmiyQqgbCj9JFIbG e1hNERJNZMW38EjkcWkejy92E= Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g0-0 (Coremail) with SMTP id _____wD3jTm_8llqT1CgJA--.17062S4; Fri, 17 Jul 2026 17:15:48 +0800 (CST) From: wangdich9700@163.com To: tiwai@suse.de, david.laight.linux@gmail.com, wangdich9700@163.com Cc: wangdicheng@kylinos.cn, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] ALSA: sparc/dbri: Fix "possible condition with no effect" warning Date: Fri, 17 Jul 2026 17:15:41 +0800 Message-Id: <20260717091542.721877-3-wangdich9700@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260717091542.721877-1-wangdich9700@163.com> References: <20260717091542.721877-1-wangdich9700@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wD3jTm_8llqT1CgJA--.17062S4 X-Coremail-Antispam: 1Uf129KBjvJXoW7Gr4rGr4UWF1DCrWftr17trb_yoW8Jryfpr WkCFWkJFs8Cws8C3s7ta1fAF15Jw1vkrsavFZYkw4rJF98J3y0gFs8G34IkF4fGryF9ay3 uwsYga4xWay5ZaUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRs0edUUUUU= X-CM-SenderInfo: pzdqwv5lfkmliqq6il2tof0z/xtbC5wTeLmpZ8sSrBgAA37 Content-Type: text/plain; charset="utf-8" From: wangdicheng Fix a compiler warning about a condition with no effect: sound/sparc/dbri.c:1843:1-3: WARNING: possible condition with no effect (if= =3D=3D else) When DBRI_DEBUG is not defined, dprintk expands to an empty do-while statement, making both branches of the if-else no-ops. Guard the entire debug block with #ifdef DBRI_DEBUG to eliminate the warning and keep the rval reference consistent with its declaration scope. Signed-off-by: wangdicheng --- sound/sparc/dbri.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 2f5f62079fa4..ccaa36525f8d 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c @@ -1840,6 +1840,7 @@ static void dbri_process_one_interrupt(struct snd_dbr= i *dbri, int x) int rval =3D D_INTR_GETRVAL(x); #endif =20 +#ifdef DBRI_DEBUG if (channel =3D=3D D_INTR_CMD) { dprintk(D_CMD, "INTR: Command: %-5s Value:%d\n", cmds[command], val); @@ -1847,6 +1848,7 @@ static void dbri_process_one_interrupt(struct snd_dbr= i *dbri, int x) dprintk(D_INT, "INTR: Chan:%d Code:%d Val:%#x\n", channel, code, rval); } +#endif =20 switch (code) { case D_INTR_CMDI: --=20 2.25.1 From nobody Sat Jul 25 05:29:19 2026 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B82013B42C3; Fri, 17 Jul 2026 09:16:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784279775; cv=none; b=M02QmKOnglk0W1fmeNNQKNxrh5mqpMaYhNYBy52CLVfKTiBMNO8oHvrp92OZtirsYhZTuN+e8euCkarOi4sFpz9VfPez4asPhNA6t+IoOhgT7bykh9bsYJ/6fL8m9JgEKm8sRvPhcO3qfI4P0mK956dDhDLeVBMpd6dk73IBv6E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784279775; c=relaxed/simple; bh=848OXhe6U0KxRAxr7jnpPmZd+1CeMFV88mt0Nz7HL8M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=O/wCY03i9S+7psfXsdhKlL6F2DBc7nVV2Bzoeu10GXYpOgF2/l/lNiraXT3OmwhmyJ16ZKqzo0eNOf0r3rvV8OlK726veHopri/Tglg2e3lUqwB1ZfbcFIpPBAQ9R8eCrt3J4ZKrMuA3PdxQ07qxPJ/4X8Dya/Zf37Vs41kv6SE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=OuTK+U/g; arc=none smtp.client-ip=220.197.31.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="OuTK+U/g" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Ar NuXaaXPl+pNmtWexIb7J0Kf0kgXGBRhY0rUy8F624=; b=OuTK+U/gkX7aJUHN5/ gbQh/pNa1aL6rGvOdEDFRHRiIncdrMBHu8NoDfOYStMeBHTTlPZR023+TlmPvOrs 6ajrhu8YvhMmdflw1tA9XN13xhDWko9vIGI9ZRfD4s4bNR8qASHf0AcMLlSvZgaU D3fcA+5yLdYnR00ANa6RBz19o= Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g0-0 (Coremail) with SMTP id _____wD3jTm_8llqT1CgJA--.17062S5; Fri, 17 Jul 2026 17:15:49 +0800 (CST) From: wangdich9700@163.com To: tiwai@suse.de, david.laight.linux@gmail.com, wangdich9700@163.com Cc: wangdicheng@kylinos.cn, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v2 3/3] ASoC: fsl_easrc: Use div64_u64 for 64-by-64 division Date: Fri, 17 Jul 2026 17:15:42 +0800 Message-Id: <20260717091542.721877-4-wangdich9700@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260717091542.721877-1-wangdich9700@163.com> References: <20260717091542.721877-1-wangdich9700@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wD3jTm_8llqT1CgJA--.17062S5 X-Coremail-Antispam: 1Uf129KBjvJXoW7tF1UZFyxCFyxKr43WrWkXrb_yoW8WF43pr ZFg398JF98GF43Jan7Grs2vFykJFZ7Cr4SkFZ8tw1j93s5Zw18tFWftw1Fkay7tryxGrZY gr4Dt345XF1UZ3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRUDGnUUUUU= X-CM-SenderInfo: pzdqwv5lfkmliqq6il2tof0z/xtbCwAXeLmpZ8sX7CwAA3B Content-Type: text/plain; charset="utf-8" From: wangdicheng Fix a coccinelle warning about do_div() truncating a 64-bit divisor: sound/soc/fsl/fsl_easrc.c:2061:2-8: WARNING: do_div() does a 64-by-32 divis= ion, please consider using div64_u64 instead. In fsl_easrc_m2m_calc_out_len(), val1 is computed as: val1 =3D (u64)in_rate << frac_bits; // frac_bits up to 39 do_div(val1, out_rate); val1 +=3D (s64)ctx_priv->ratio_mod << (frac_bits - 31); val1 =3D val1 >> 12; In the worst case (in_rate=3D384000, out_rate=3D8000, frac_bits=3D39): val1 =3D 384000 << 39 / 8000 =3D 26,388,279,068,672 val1 >> 12 =3D 6,440,497,829 (33 bits, exceeds 32-bit range) val1 is then used as the divisor in do_div(val2, val1), where do_div() silently truncates it to 32 bits, producing incorrect results. Use div64_u64() to perform a proper 64-by-64 division. Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Cc: stable@vger.kernel.org Signed-off-by: wangdicheng --- sound/soc/fsl/fsl_easrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 114a6c0b6b73..d0bbe9f71e36 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -2058,7 +2058,7 @@ static int fsl_easrc_m2m_calc_out_len(struct fsl_asrc= _pair *pair, int input_buff /* right shift 12 bit to make ratio in 32bit space */ val2 =3D (u64)in_samples << (frac_bits - 12); val1 =3D val1 >> 12; - do_div(val2, val1); + val2 =3D div64_u64(val2, val1); out_samples =3D val2; =20 out_length =3D out_samples * out_width * channels; --=20 2.25.1