Linux kernel staging patches
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: "Diego Fernando Mancera Gómez" <diegomancera.dev@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	m.steinmoetzger@gmail.com, guojy.bj@gmail.com,
	straube.linux@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
Date: Fri, 22 May 2026 08:35:46 +0300	[thread overview]
Message-ID: <ag_rMv-4wSNuaeIx@stanley.mountain> (raw)
In-Reply-To: <20260522050429.161273-1-diegomancera.dev@gmail.com>

On Thu, May 21, 2026 at 11:04:29PM -0600, Diego Fernando Mancera Gómez wrote:
> Refactored redundant if-else blocks to a cleaner else-if structure in
> odm_HWConfig.c and fixed indentation to use tabs as required by the
> kernel coding style.
> 
> Signed-off-by: Diego Fernando Mancera Gómez <diegomancera.dev@gmail.com>
> ---

https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/

Please wait a day between resends.

>  drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> index c88d669cb086..2e47734a0ae9 100644
> --- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> +++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
> @@ -228,18 +228,11 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
>  		odm_parsing_cfo(dm_odm, pkt_info, phy_sta_rpt->path_cfotail);
>  	}
>  
> -	/*
> -	 * UI BSS List signal strength(in percentage), make it good
> -	 * looking, from 0~100.
> -	 * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
> -	 */
> -	if (is_cck_rate) {
> +	if (is_cck_rate)
>  		phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
> -	} else {
> -		if (rf_rx_num != 0) {
> -			phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> -		}
> -	}
> +	else if (rf_rx_num != 0)
> +		phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
> +

No need for this extra blank line.

>  }

regards,
dan carpenter

>  
>  static void odm_Process_RSSIForDM(
> @@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
>  
>  	return HAL_STATUS_SUCCESS;
>  }
> -
> -- 
> 2.43.0
> 

      parent reply	other threads:[~2026-05-22  5:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22  5:04 [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c Diego Fernando Mancera Gómez
2026-05-22  5:22 ` Ahmet Sezgin Duran
2026-05-22  5:35 ` Dan Carpenter [this message]

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=ag_rMv-4wSNuaeIx@stanley.mountain \
    --to=error27@gmail.com \
    --cc=diegomancera.dev@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guojy.bj@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=m.steinmoetzger@gmail.com \
    --cc=straube.linux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox