Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2055252lqt; Sun, 21 Apr 2024 23:02:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcQE4z98d7rMTYBjhPoIeccU302onpTf5xldT5TrkW5QjokFMA9knlmLnK8np90R573TTKFiumtvHNu03bLCM4Mj5NCdqbu7YK848FlA== X-Google-Smtp-Source: AGHT+IEGW83drxn0nd/pBoOIX+oGh/4MXWgHVIOpu5N0jKaqjZYrVpRD429XGW8/DW9qWFys5Oi3 X-Received: by 2002:a05:6a21:1690:b0:1ac:4ea6:1a54 with SMTP id np16-20020a056a21169000b001ac4ea61a54mr8114122pzb.38.1713765774425; Sun, 21 Apr 2024 23:02:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713765774; cv=pass; d=google.com; s=arc-20160816; b=aCuIcfBh4/fJDD1tyG6N5lO4ml9/RqrB1rTk2oY/vTjjH2oUgyu1GHOT1XfqlA3G66 rzikyvKt2UqHUEzvKim+S3e6EaRRkII2Zzq2enh9vAwwEej0YVOKc49PsyK6i7O2V7O/ C4RT5VCIHdNXmhh1JZn4wFDTcQp6XogtXUVvwuiHmxrdiFoSFoNyqmuiKTv58EZj6C/A xjosOrmof6J86oViUa9Ibu8ecuq+4eEIXWkCP6xA886V9FB3WhfTmK94L4hp4yi5CmuS q5q6i3qWFQAOPtgb4vZr4FgoJng/O8wFj3FLbXHYuEKRJDNLOz2DvYyJpkVk3wFRXg1c 5z0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=ph5BXRl4Y3VX238IHfc9KODj1KBeJ4m0aVsMn73e8+8=; fh=Ac8oldqnJ+7Je03X0O74nXZl/UAX50LUqvSTXNfsQLU=; b=oj7dmEg/qY4/5i/F0mLpx10q5YmnJuxMjKDiiOpR/1lJuAMGfQax+UPwrW1zwTlF4I Kb5GHItVx7XTlkNA3AExcu14/25YqNN4dpN6NCjqLLyX7XxdDDzhtC5v3SrT2e+QWwbk sVZwW0j1lmQqSppWyNBNjokunw9eD6xV80KT2loqqc24KTbJt1eVcZx1mxAX7v4R01yj 7zjDQSdR6XxSGssh1AljBWKKThkaW7D2wHZdLIPNStiyN1p2K2ATI+UP8Bc+CD0aN+0+ mCxDGdWIvPeaDk564AhBCF/LOy35BRZWQ33KbdmZ2NrEwAt5yQEz5X6qvYlP9sSb363U TEqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-6637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6637-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lm1-20020a056a003c8100b006ea8cb1b66dsi7525921pfb.66.2024.04.21.23.02.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 23:02:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-6637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6637-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1842628285F for ; Mon, 22 Apr 2024 06:02:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F00F182DF; Mon, 22 Apr 2024 06:02:37 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D498175AB; Mon, 22 Apr 2024 06:02:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713765757; cv=none; b=LjGbs1udaqeVHEkg/8xgJ9eFoTJkKEP+zoMcnr0cYUvEgKCv1SlT1vjiQaEtvb10gITC0G0dizN6t9yu84iA7luJ6IfklQi1pwZjuu8+B8XZegN6vGEeRHvezqcTuzKoB+iCrdaFyoz3QyvyJLoIPlAGjhTG+DjkRK6IjSdCQRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713765757; c=relaxed/simple; bh=AJRjSxRJ+P5vsQS7ccNJkFMoIeeqauCdm7Wr4+3xWyw=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=HOpvbZqn0xgIdMOmh/YC12yKAIZfkXjmp8023pLynhIm55nJBaMj9lL5paXHWA1bF2Xw5kptv4WugQCJ3zyxVyYh8JhcEPbq766hL1SqcVAzxs3laMJWWd6QjmqPK+TM7MmHqQbYbCqloIjHKtpPLXURFs3Iu9/ZMURlrS2qteU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 43M62E3D03953822, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 43M62E3D03953822 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Apr 2024 14:02:14 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 22 Apr 2024 14:02:14 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 22 Apr 2024 14:02:14 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7]) by RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7%5]) with mapi id 15.01.2507.035; Mon, 22 Apr 2024 14:02:14 +0800 From: Ping-Ke Shih To: Jiapeng Chong CC: "kvalo@kernel.org" , "linux-wireless@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Abaci Robot Subject: RE: [PATCH] wifi: rtw89: Remove useless else Thread-Topic: [PATCH] wifi: rtw89: Remove useless else Thread-Index: AQHalHkJ1VGeiWLcV0S1xT409BU1hbFzyjGQ Date: Mon, 22 Apr 2024 06:02:14 +0000 Message-ID: References: <20240422055022.33388-1-jiapeng.chong@linux.alibaba.com> In-Reply-To: <20240422055022.33388-1-jiapeng.chong@linux.alibaba.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Jiapeng Chong wrote: > Subject: [PATCH] wifi: rtw89: Remove useless else Please point out the stuff like functions you are changing.=20 >=20 > The assignment of the else and if branches is the same, so the else > here is redundant, so we remove it. >=20 > ./drivers/net/wireless/realtek/rtw89/phy.c:6406:2-4: WARNING: possible co= ndition with no effect (if =3D=3D > else). >=20 > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=3D8812 > Signed-off-by: Jiapeng Chong > --- > drivers/net/wireless/realtek/rtw89/phy.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) >=20 > diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wirel= ess/realtek/rtw89/phy.c > index eaa18140d1a8..ca5a098c30a4 100644 > --- a/drivers/net/wireless/realtek/rtw89/phy.c > +++ b/drivers/net/wireless/realtek/rtw89/phy.c > @@ -6403,10 +6403,7 @@ enum rtw89_rf_path_bit rtw89_phy_get_kpath(struct = rtw89_dev *rtwdev, > return RF_D; > case MLO_0_PLUS_2_1RF: > case MLO_2_PLUS_0_1RF: > - if (phy_idx =3D=3D RTW89_PHY_0) > - return RF_AB; > - else > - return RF_AB; > + return RF_AB; The PHY configures to corresponding MLO modes are complicated, so RF people always add branches of phy_idx to prevent missing something, and this is intentionally to say two cases are identical. It is fine to apply your patc= h, but please add a comment to note that, like /* for both PHY 0/1 */ > case MLO_0_PLUS_2_2RF: > case MLO_2_PLUS_0_2RF: > case MLO_2_PLUS_2_2RF: > -- > 2.20.1.7.g153144c >=20