[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <58c6f23e-1fb-fef6-8177-4f24ad559889@inria.fr>
Date: Tue, 25 Mar 2025 10:43:57 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Erick Karanja <karanja99erick@...il.com>
cc: gregkh@...uxfoundation.org, outreachy@...ts.linux.dev,
philipp.g.hortmann@...il.com, davidzalman.101@...il.com,
vivek6429.ts@...il.com, viro@...iv.linux.org.uk,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: Rename variable supportRateNum
On Tue, 25 Mar 2025, Erick Karanja wrote:
> Rename the variable `supportRateNum` to `support_rate_num` to adhere to
> Linux kernel coding standards by using snake_case instead of CamelCase.
Maybe it would make sense to do supportRate at the same time, since they
seem to be closely related?
julia
>
> Fixes checkpatch.pl warning:
> CHECK: Avoid CamelCase: <supportRateNum>
>
> Signed-off-by: Erick Karanja <karanja99erick@...il.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_ap.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index 50022bb5911e..5124260602c8 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -370,7 +370,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
> void update_bmc_sta(struct adapter *padapter)
> {
> unsigned char network_type;
> - int supportRateNum = 0;
> + int support_rate_num = 0;
> unsigned int tx_ra_bitmap = 0;
> struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
> @@ -396,9 +396,9 @@ void update_bmc_sta(struct adapter *padapter)
> /* psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, because it has been set before this. */
>
> /* prepare for add_RATid */
> - supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->supported_rates);
> + support_rate_num = rtw_get_rateset_len((u8 *)&pcur_network->supported_rates);
> network_type = rtw_check_network_type((u8 *)&pcur_network->supported_rates,
> - supportRateNum,
> + support_rate_num,
> pcur_network->configuration.ds_config
> );
> if (is_supported_tx_cck(network_type)) {
> @@ -893,7 +893,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
> );
> if (p) {
> memcpy(supportRate, p + 2, ie_len);
> - supportRateNum = ie_len;
> + support_rate_num = ie_len;
> }
>
> /* get ext_supported rates */
> @@ -904,11 +904,12 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
> pbss_network->ie_length - _BEACON_IE_OFFSET_
> );
> if (p) {
> - memcpy(supportRate + supportRateNum, p + 2, ie_len);
> - supportRateNum += ie_len;
> + memcpy(supportRate + support_rate_num, p + 2, ie_len);
> + support_rate_num += ie_len;
> }
>
> - network_type = rtw_check_network_type(supportRate, supportRateNum, channel);
> + network_type = rtw_check_network_type(supportRate, support_rate_num,
> + channel);
>
> rtw_set_supported_rate(pbss_network->supported_rates, network_type);
>
> --
> 2.43.0
>
>
>
Powered by blists - more mailing lists