Message ID | 20230928085200.48635-1-jiapeng.chong@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3181246vqu; Thu, 28 Sep 2023 02:29:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHw2Te83jn4Upfi/rp4B5NM3pzpoiYVlXxeW/MmlxTsxrJeQt3S1GFkrz+vhT3B1JE83Rju X-Received: by 2002:a17:90a:3884:b0:26b:49de:13bd with SMTP id x4-20020a17090a388400b0026b49de13bdmr543236pjb.36.1695893364569; Thu, 28 Sep 2023 02:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695893364; cv=none; d=google.com; s=arc-20160816; b=XCqN/K7MgbczY3sw7alSMjiTqOXNF/llMN4oDxxShexi4UvN1HyQj7dYyIXHtfC0qS TpsX48QgzhlSKe0fWYCPsj+yr2P8T9Ef8Gjp4SH0GQ2jd3YPjb/fI7PabFNZVIG/Y1Lb hW3KNs+fMDA5is/RRkYBgWbtY/SY5Apk6xprOqny/MvNMOChcCKxQ9QpDscQS0vAvWLw AVkxlMNPVcBDDM2RFo4/g47rNpKKdFyWFEOto4G98NLw5HnbW28g95cq0ZwTNAq7bNA5 AnzVTMl3KRHrjpFeRzETTFlIMdTUMP/dnCmSlRZvwl52InefGDj2cVsfmRD3iwd+Hdcj ltMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=w8e9gVtgJaLVz2DheyXwWVBsviyOpq10ZtSswPfwxDk=; fh=rZqWPw+Wk4KFxMJ6vGZ5viu5OoVWCOnjeHWj7X3nkxo=; b=WBioNCTOBiXFZQSMnjLayZA+ECGr1AFw9Kr6fDMOblvizrA7O4bvvxlw5yKiTW4xXN uAGRDLhWacZY4/5qxniqdiSqq2jHo5WhW3RnvCoO6CB6UQE2xfiW8XimnYeywNE9pKab u1Z8+HgnEZg8P9yQw9gN4qa7LCZACKmlD+2N8lFbH9Xidv/CHuviFFLyH1UCw7ukIZBy UZreOLTID5fz+b+5sZVQMxFok1KJ1eKaOlcma8oc2l+wq2ViSBufDTL6xZ5tgKCU3sqV +eSNQabDwJi9lIDYkVHzvalGBdh4ClFnJP4ZwsRWNVQXX6uQYeCcvrln/yd92kwdAgjx IzAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id pg1-20020a17090b1e0100b0026845738569si19586085pjb.169.2023.09.28.02.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 02:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id ADFEF83CDFDF; Thu, 28 Sep 2023 01:53:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbjI1Iwh (ORCPT <rfc822;pwkd43@gmail.com> + 21 others); Thu, 28 Sep 2023 04:52:37 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <jiapeng.chong@linux.alibaba.com> 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 <jiapeng.chong@linux.alibaba.com>, Abaci Robot <abaci@linux.alibaba.com> 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: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 01:53:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778273080407291301 X-GMAIL-MSGID: 1778273080407291301 |
Series |
ASoC: cs42l43: Remove useless else
|
|
Commit Message
Jiapeng Chong
Sept. 28, 2023, 8:52 a.m. UTC
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 no effect (if == else).
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6712
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
sound/soc/codecs/cs42l43-sdw.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
Comments
On Thu, Sep 28, 2023 at 04:52:00PM +0800, Jiapeng Chong wrote: > 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 no effect (if == else). > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6712 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > --- Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Thanks, Charles
On Thu, 28 Sep 2023 16:52:00 +0800, Jiapeng Chong wrote: > 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 no effect (if == else). > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: cs42l43: Remove useless else commit: 67fcdbfd9e133be69c9541a806f6ccfe594fa9a9 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
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; snd_sdw_params_to_config(substream, params, &sconfig, &pconfig); - - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - pconfig.num = dai->id; - else - pconfig.num = dai->id; + pconfig.num = dai->id; ret = sdw_stream_add_slave(sdw, &sconfig, &pconfig, 1, sdw_stream); if (ret) {