Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3088103rdh; Thu, 28 Sep 2023 02:05:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVXAkBVCDiUGrKJRc6xu0TnbbKCHKErCgt2+h55GbGzqGH7GbBYV5xL/9vmgDaLqtz3joT X-Received: by 2002:a05:6870:8091:b0:1db:23f6:283f with SMTP id q17-20020a056870809100b001db23f6283fmr731793oab.27.1695891940251; Thu, 28 Sep 2023 02:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695891940; cv=none; d=google.com; s=arc-20160816; b=WHEVpSK2hXFGeh+jQD6LgDuWkmUsl/YNfyRrxBWahD0KsmqHhQ3myH+jOjzEhI0A97 atpQ9KhBBOOgimuK2CCKVpctMH3smi5uAqBN2K2ueYo1yvSofW/OLZiXt3rwq219VVB1 3JccsLb/fDmcCw9Mj5n0zmS0lvVVfEkyLemP/X3yt/2K4QhdtsFiXnJFedr6tnVJ5aab iylI0wxYE10fk0dHlb/3/TPaXeRIuyAG74O8b2+702VRBSQ6g+ikV2xZ5st7iqmniHR7 +tZ15MjMaVFXdUmWi1fFCBkNWzyD8TcDm494wgKfY7HQ6DNR7ZQtQebrlv7qeh27Hhyj UAMQ== 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:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d4-20020a655884000000b0056534e3aeeasi17758031pgu.474.2023.09.28.02.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 02:05:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id B6B1D80C2EB1; Thu, 28 Sep 2023 01:52:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230445AbjI1Iwg (ORCPT + 99 others); Thu, 28 Sep 2023 04:52:36 -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: 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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 28 Sep 2023 01:52:47 -0700 (PDT) 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 Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6712 Signed-off-by: Jiapeng Chong --- 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; 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) { -- 2.20.1.7.g153144c