From nobody Wed Dec 17 11:33:40 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9E59CE7B0C for ; Thu, 28 Sep 2023 08:52:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbjI1Iwi (ORCPT ); Thu, 28 Sep 2023 04:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjI1Iwe (ORCPT ); Thu, 28 Sep 2023 04:52:34 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7805CB7 for ; Thu, 28 Sep 2023 01:52:21 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0Vt19StJ_1695891122; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Vt19StJ_1695891122) by smtp.aliyun-inc.com; Thu, 28 Sep 2023 16:52:15 +0800 From: Jiapeng Chong To: james.schulman@cirrus.com Cc: david.rhodes@cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] ASoC: cs42l43: Remove useless else Date: Thu, 28 Sep 2023 16:52:00 +0800 Message-Id: <20230928085200.48635-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The assignment of the else and if branches is the same, so the else here is redundant, so we remove it. ./sound/soc/codecs/cs42l43-sdw.c:35:1-3: WARNING: possible condition with n= o effect (if =3D=3D else). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=3D6712 Signed-off-by: Jiapeng Chong Acked-by: Charles Keepax --- sound/soc/codecs/cs42l43-sdw.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/codecs/cs42l43-sdw.c b/sound/soc/codecs/cs42l43-sdw.c index 55ac5fe8c3db..388f95853b69 100644 --- a/sound/soc/codecs/cs42l43-sdw.c +++ b/sound/soc/codecs/cs42l43-sdw.c @@ -31,11 +31,7 @@ int cs42l43_sdw_add_peripheral(struct snd_pcm_substream = *substream, return -EINVAL; =20 snd_sdw_params_to_config(substream, params, &sconfig, &pconfig); - - if (substream->stream =3D=3D SNDRV_PCM_STREAM_PLAYBACK) - pconfig.num =3D dai->id; - else - pconfig.num =3D dai->id; + pconfig.num =3D dai->id; =20 ret =3D sdw_stream_add_slave(sdw, &sconfig, &pconfig, 1, sdw_stream); if (ret) { --=20 2.20.1.7.g153144c