Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp563245rwl; Thu, 5 Jan 2023 01:04:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXsxYrJXA+KCj+zxW3281YWk7SvEF5psR15qym46SjAUnvVb45xvezAK9IODtz2IgDnBFfpk X-Received: by 2002:a17:907:a501:b0:7c1:700:1e2d with SMTP id vr1-20020a170907a50100b007c107001e2dmr44107619ejc.20.1672909439904; Thu, 05 Jan 2023 01:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672909439; cv=none; d=google.com; s=arc-20160816; b=KjUnkZtlUrpapxIBgTzllC3SuWAYoBwSDgAOlVT1txvlDcmMW/lNwuZ/ReE0cVKQCs pUIOIIfwTfibsAvtfz7T5+z14SrAL+V24rYkQk5IevRFhFVPil9WT2J4Ok29vqt9SOet BKeXuGHtb+v9I2QZM8HKQa1hYexUe9FwYxV4nQp3b4WsaNs4SqKJF6Qr/2MHio/g3TVa 1ncf5kytS6X3PazZK/vqGgVU/iB2Qw6HixYK+OGl9+uKp1yzGxQ4yXkylhGt0OTxxj8b DuuORzbGMKotpJ4yIVLnQaplmF76DqkvcDJGNNlqRYeKTsmkA7XVnLxUp67MXz+qoPHh 1Brw== 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=Ut9/G3G6GYx1aHhXlg4LQpnJzbg81vXcxtNy160o/1o=; b=mIYhH3k3J2JMhQrSbzn0A57GxOqNzqw9rBV+JoG1GeDmU6V9PlC2w8HOPOolLSTwr7 SHEn+hopaAdxS7UwVXmB08Bgb8yPYGtmnpYhEhKCx7Br6VsnfWTMbH3RicR1IyaKo2F0 ZYXNtRLYHM5uDBWDEnkhQnc9qGLrbTG7YLV2iJDrb7wKY+/dx/nRncM/eqO0t+3J6Ny/ GlguY43MOouRVNKsRvF5onSW5jFltd+ioUqDy9JjxNiYNYiKeWaolRc31UkJxMP/ByGU EADAOVyto7iUYTRwNgUtguJeOq3fwcevFICeY7QJKRsyr7coWTHmPOpPHzLwu/8DU+CS 6GNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb7-20020a170907160700b0078dbd939dacsi33598871ejc.545.2023.01.05.01.03.41; Thu, 05 Jan 2023 01:03:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbjAEI6g (ORCPT + 66 others); Thu, 5 Jan 2023 03:58:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231684AbjAEI6c (ORCPT ); Thu, 5 Jan 2023 03:58:32 -0500 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE274FD74; Thu, 5 Jan 2023 00:58:29 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R741e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0VYvOwUl_1672909085; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VYvOwUl_1672909085) by smtp.aliyun-inc.com; Thu, 05 Jan 2023 16:58:27 +0800 From: Jiapeng Chong To: stf_xl@wp.pl Cc: helmut.schaa@googlemail.com, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] wifi: rt2x00: Remove useless else if Date: Thu, 5 Jan 2023 16:58:02 +0800 Message-Id: <20230105085802.30905-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=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The assignment of the else and else if branches is the same, so the else if here is redundant, so we remove it and add a comment to make the code here readable. ./drivers/net/wireless/ralink/rt2x00/rt2800lib.c:8927:9-11: WARNING: possible condition with no effect (if == else). Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3631 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index 12b700c7b9c3..36b9cd4dd138 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -8924,9 +8924,7 @@ static void rt2800_rxiq_calibration(struct rt2x00_dev *rt2x00dev) if (i < 2 && (bbptemp & 0x800000)) result = (bbptemp & 0xffffff) - 0x1000000; - else if (i == 4) - result = bbptemp; - else + else /* This branch contains if(i==4) */ result = bbptemp; if (i == 0) -- 2.20.1.7.g153144c