From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) (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 D34213126A9 for ; Mon, 6 Apr 2026 20:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775508465; cv=none; b=mxbvdz1tSdy1duWpBL/YyZxaUnkrR5kEe7XK/bv9n49r0RyYYLcRMDJpyq7jm8s/RuhEDnZyg+YuVQ5hE7CvG5EKC6+aAYkBPfcWFgPAEP8hAfDuhmhwDvBBl0Wcd32F3OoU/ZyWTskzcHDjY92+JNZOa8fm5iJMVmsKbnM/79o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775508465; c=relaxed/simple; bh=QyIZ3LiK1hCK/iTxaIe05uL7Wa5dFGvpMCo+BHEtues=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=d57udCT7e9x5KlxQfB4Qdi4+1GY2Qjl4duYif6GtkAG1z6V9JnL2bTKPD0EK0uuZYzllnTiT64YjS+gZq1oS9C9J3a0FSQxdbNtn3HTVUxkMJosCnrCMlPRORaHBKPzn2BjaTa/H9A/DNFssxyUfAGlWf/c5CD/dGsi6uDyvdPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=a4+bqZgA; arc=none smtp.client-ip=209.85.128.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a4+bqZgA" Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-79a60975dc5so40132207b3.0 for ; Mon, 06 Apr 2026 13:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775508463; x=1776113263; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=D6bSpybbve/uppZrHu04AihAoKtS4Osvf69+FKM+5YU=; b=a4+bqZgAJqXH5qBkC/0hQjmc4a87Leuc9TXFOmwsJs7TzJ8hajMNTaKHsdWw3E0vjI 1TfePYCRrxIY7G+UdwAa8Cw7Pzu8HEKVY7dwq8BQ6/7eiSfIAaVSLV+hWOOHj8g9/Qpc xjh6bu/DkEG1Qq+ykG7NTRHiLZRYvUjGa/Dee6V5jtMuOggYU4dFlTjk6obL9zRgPaap YwxT42iUfcDnYXEUVZHuv809WEdBSp1VhxOm1zqyS2XAUj57YfYKpRJ/dBxoXe3OKV9O G215ECBZ1Fs+124lVsEqg0vKn9u44vy15OkXudLcMc51hHkdMsSnALWMCtIONYoix+OG HzHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775508463; x=1776113263; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=D6bSpybbve/uppZrHu04AihAoKtS4Osvf69+FKM+5YU=; b=gXf4H9nZ6R0/q2WXR7zi0zyjRQPd2lbkQOISMmuxJzOOtBmpQIzFriHeWX4N28QZOT eonH7GWsiuqzwbjRgHMQpqUJJRq6tuKjlWhKgiNMMEEBC/06Cq1HwA/rZ31xVTi1VAVR OzXY0BYlZKllei3xGetj4S8xj5KLee9a+B66U+2u0cMVnBmaHqW71Fe8aNINj0k8zVcC MJ+WnV0JM4H0w8hYLcgxUAPNQngoNbFM2PBfbicdnFYaW1P+EzyvQO1NPwEwK2E1umEt aa26QU7sZ0goFsaP+wYnKR0PgGEiKYnYWhHttqIvAGKt/ld/+Da4P67AKGZ4AoMwRrys uOQA== X-Forwarded-Encrypted: i=1; AJvYcCUL5orO3fP9Qs0qtKzVeo9ISnOAYYcxtLHO9dgglfnC3t+9fmXu5FCpt13kIhyvpsfhvRoqnSLmB4N3/7o=@vger.kernel.org X-Gm-Message-State: AOJu0YyIz5/KNNISpAeS9HDUGra4kHKizBjHwqY6a9RHZ6vuCEfpsWDM XeoJKWJajnWs4Ml1oBefRZHR0mk58v0sM1E6RTyb/2h4VaX8ItNGglUh X-Gm-Gg: AeBDievbsxkBN1beBind2KI8XP5vo2/RUuLaxqIsaibNfSxlJ66ZHVB710MScMelCSc mGKkyXSstpUI6ezkE+WwIY+rLt+4wmbavm6OWYZwbg2x+o5WwfNYpkx13IhbqojUcFxHKDHhh2+ fpUbpEjWs+6fxQh5gxtPDqUeNlQky1OgfZLm6vmi/GJxGCZsdyyPTRdaZgrmRaLfL5JelX6CkgA q0QznpnaRcAgjZordaLwXx6Yfr7/BcROw5/LG0Y1bg9aYE4ew2nz9H7jWh6QrIsVUtefTsmXVca 2rId4yOuciLDQOysYm/dRNHC+l/jSCJn0u1veuVrZ1Glba+OSVXsFqyRKRRFRScIQAnT6q6QCTT KgEG1UgdT8Yj/S8LJBhb7m+05LLP7wqfE4PlsYJyUCobeM8me/NVwWWrhOYsALvLRv5UuLwIOxZ oM1nNStel2BVOwSK03ZRMcq2Vd/G4JxFlUTG+5E6f93b2uw8bi5aNQvUORyPPwlRisT9XT0V9OZ WulykXxmiEQb/N3H+CsXubduqog+h9L X-Received: by 2002:a05:690c:81:b0:798:cf16:1c6e with SMTP id 00721157ae682-7a4d3bd7d7amr143486757b3.21.1775508462885; Mon, 06 Apr 2026 13:47:42 -0700 (PDT) Received: from localhost ([2601:7c0:c37e:2360::17e2]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7a36e42fec3sm58082817b3.4.2026.04.06.13.47.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2026 13:47:42 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 06 Apr 2026 15:47:39 -0500 Message-Id: Cc: , , , , , Subject: Re: [RFT PATCH v3 5/5] staging: rtl8723bs: remove duplicate rate checks in PHY_GetTxPowerIndexBase() From: "Ethan Tidmore" To: "Luka Gejak" , "Prithvi Tambewagh" , , , , , , , , , , , , , , , , X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260405114132.310774-1-activprithvi@gmail.com> <20260405114132.310774-6-activprithvi@gmail.com> In-Reply-To: On Sun Apr 5, 2026 at 7:57 AM CDT, Luka Gejak wrote: > On April 5, 2026 1:41:32 PM GMT+02:00, Prithvi Tambewagh wrote: >>The code previously checked (Rate >=3D MGN_MCS0 && Rate <=3D MGN_MCS7) >>condition twice - once for the (BandWidth =3D=3D CHANNEL_WIDTH_20) check = and >>once for the (BandWidth =3D=3D CHANNEL_WIDTH_40) check. Fix if statement >>formatting to move that if check as an outer if check to improve code >>formatting. >> >>Signed-off-by: Prithvi Tambewagh >>--- >> drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 7 +++---- >> 1 file changed, 3 insertions(+), 4 deletions(-) >> >>diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/sta= ging/rtl8723bs/hal/hal_com_phycfg.c >>index 9e523491a008..efd1c76f2953 100644 >>--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c >>+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c >>@@ -469,11 +469,10 @@ u8 PHY_GetTxPowerIndexBase( >> if ((Rate >=3D MGN_6M && Rate <=3D MGN_54M) && !IS_CCK_RATE(Rate)) >> txPower +=3D pHalData->OFDM_24G_Diff[RFPath][TX_1S]; >>=20 >>- if (BandWidth =3D=3D CHANNEL_WIDTH_20) { /* BW20-1S, BW20-2S */ >>- if (MGN_MCS0 <=3D Rate && Rate <=3D MGN_MCS7) >>+ if (Rate >=3D MGN_MCS0 && Rate <=3D MGN_MCS7) { >>+ if (BandWidth =3D=3D CHANNEL_WIDTH_20) /* BW20-1S, BW20-2S */ >> txPower +=3D pHalData->BW20_24G_Diff[RFPath][TX_1S]; >>- } else if (BandWidth =3D=3D CHANNEL_WIDTH_40) { /* BW40-1S, BW40-2S */ >>- if (MGN_MCS0 <=3D Rate && Rate <=3D MGN_MCS7) >>+ else if (BandWidth =3D=3D CHANNEL_WIDTH_40) /* BW40-1S, BW40-2S */ >> txPower +=3D pHalData->BW40_24G_Diff[RFPath][TX_1S]; >> } >>=20 > > LGTM, > Reviewed-by: Luka Gejak Doesn't apply to staging-next too. Thanks, ET