lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <81c7955216f5cc7565a396e50e5474ec8f6e3017.1749006565.git.xiaopei01@kylinos.cn>
Date: Wed,  4 Jun 2025 11:13:29 +0800
From: Pei Xiao <xiaopei01@...inos.cn>
To: nicolas.frattaroli@...labora.com,
	linux-rockchip@...ts.infradead.org,
	linux-sound@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Cc: Pei Xiao <xiaopei01@...inos.cn>
Subject: [PATCH 1/2] ASOC: rochchip: Simplify the condition logic in rockchip_sai_xfer_stop

cocci warning:
./sound/soc/rockchip/rockchip_sai.c:387:8-10:
	WARNING: possible condition with no effect (if == else)

Simplify the condition logic in rockchip_sai_xfer_stop() by removing the
redundant SNDRV_PCM_STREAM_PLAYBACK branch. The modified logic now:
1. For stream < 0: handles both playback and capture
2. For all other cases (both PLAYBACK and CAPTURE):
   sets playback = true and capture = false

Signed-off-by: Pei Xiao <xiaopei01@...inos.cn>
---
 sound/soc/rockchip/rockchip_sai.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/rockchip/rockchip_sai.c b/sound/soc/rockchip/rockchip_sai.c
index 602f1ddfad00..79b04770da1c 100644
--- a/sound/soc/rockchip/rockchip_sai.c
+++ b/sound/soc/rockchip/rockchip_sai.c
@@ -384,9 +384,6 @@ static void rockchip_sai_xfer_stop(struct rk_sai_dev *sai, int stream)
 	if (stream < 0) {
 		playback = true;
 		capture = true;
-	} else if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		playback = true;
-		capture = false;
 	} else {
 		playback = true;
 		capture = false;
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ