All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Mohammed Anees <pvmohammedanees2003@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Kalle Valo <kvalo@kernel.org>, kernel test robot <lkp@intel.com>
Subject: RE: [PATCH v2] wifi: rtw88: Refactor looping in rtw_phy_store_tx_power_by_rate
Date: Fri, 18 Oct 2024 05:32:00 +0000	[thread overview]
Message-ID: <87a0854a459549a5addfd39ab94669c1@realtek.com> (raw)
In-Reply-To: <20241017080638.13074-1-pvmohammedanees2003@gmail.com>

Mohammed Anees <pvmohammedanees2003@gmail.com> wrote:
> The previous implementation included an unnecessary else
> condition paired with a continue statement. Since a check
> is already performed to determine if the band is either
> 2G or 5G, the else condition will never be triggered.
> We can remove this check.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410171143.OnFlgIwK-lkp@intel.com/

no need this Closes link because of typo of v1. I will remove this during merging. 

> Signed-off-by: Mohammed Anees <pvmohammedanees2003@gmail.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
> v2:
> - Changed from using a pointer approach to a simpler if-else structure for clarity.
> ---
>  drivers/net/wireless/realtek/rtw88/phy.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c
> index 37ef80c9091d..8b9f8f73c14c 100644
> --- a/drivers/net/wireless/realtek/rtw88/phy.c
> +++ b/drivers/net/wireless/realtek/rtw88/phy.c
> @@ -1470,10 +1470,8 @@ static void rtw_phy_store_tx_power_by_rate(struct rtw_dev *rtwdev,
>                 rate = rates[i];
>                 if (band == PHY_BAND_2G)
>                         hal->tx_pwr_by_rate_offset_2g[rfpath][rate] = offset;
> -               else if (band == PHY_BAND_5G)
> -                       hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset;
>                 else
> -                       continue;
> +                       hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset;
>         }
>  }
> 
> --
> 2.47.0


  reply	other threads:[~2024-10-18  5:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17  8:06 [PATCH v2] wifi: rtw88: Refactor looping in rtw_phy_store_tx_power_by_rate Mohammed Anees
2024-10-18  5:32 ` Ping-Ke Shih [this message]
2024-10-25  2:15 ` Ping-Ke Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a0854a459549a5addfd39ab94669c1@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=pvmohammedanees2003@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.