public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Lautaro Javier Fernandez Pricco <ljfp@ljfp.xyz>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Florian Schilhabel <florian.c.schilhabel@googlemail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	outreachy <outreachy@lists.linux.dev>
Cc: linux-staging <linux-staging@lists.linux.dev>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: rtl8712: Rename variable bw_40MHz_en
Date: Sat, 23 Mar 2024 23:30:57 +0100	[thread overview]
Message-ID: <9d8f35f6-2d23-43bf-9ac5-c88e4f65609e@gmail.com> (raw)
In-Reply-To: <Zf4fhSomoYzCE4gW@ljfp.xyz>

On 3/23/24 01:17, Lautaro Javier Fernandez Pricco wrote:
> The bw_40MHz_en variable triggered an 'Avoid
> CamelCase' warning from checkpatch.pl. This patch addresses said warning by
> renaming the variable to bw_40mhz_en.
Hi Lautaro Javier,
Checkpatch is wrong with this proposal. The offical abreviations for 
MHz, kHz, GHz, dB and so on can remain as they are.
This is easier to read.

> Reported by checkpatch:
> CHECK: Avoid CamelCase: <bw_40MHz_en>
It is not required to add the name of the tool who found this. Much more 
important is a good description why this change makes sense...
For example:
... to shorten code.
... to improve readability.

Thanks for your support.

Bye Philipp


> Signed-off-by: Lautaro Javier Fernandez Pricco <ljfp@ljfp.xyz>
> ---
>   drivers/staging/rtl8712/hal_init.c        | 2 +-
>   drivers/staging/rtl8712/rtl8712_hal.h     | 2 +-
>   drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
> index 1148075f0cd6..efea4f97488c 100644
> --- a/drivers/staging/rtl8712/hal_init.c
> +++ b/drivers/staging/rtl8712/hal_init.c
> @@ -98,7 +98,7 @@ static void fill_fwpriv(struct _adapter *adapter, struct fw_priv *fwpriv)
>   	/* todo: check if needs endian conversion */
>   	fwpriv->hci_sel =  RTL8712_HCI_TYPE_72USB;
>   	fwpriv->usb_ep_num = (u8)dvobj->nr_endpoint;
> -	fwpriv->bw_40MHz_en = regpriv->cbw40_enable;
> +	fwpriv->bw_40mhz_en = regpriv->cbw40_enable;
>   	switch (regpriv->rf_config) {
>   	case RTL8712_RF_1T1R:
>   		fwpriv->rf_config = RTL8712_RFC_1T1R;
> diff --git a/drivers/staging/rtl8712/rtl8712_hal.h b/drivers/staging/rtl8712/rtl8712_hal.h
> index 66cc4645e2d1..3df687fce79d 100644
> --- a/drivers/staging/rtl8712/rtl8712_hal.h
> +++ b/drivers/staging/rtl8712/rtl8712_hal.h
> @@ -85,7 +85,7 @@ struct fw_priv {   /*8-bytes alignment required*/
>   	unsigned char rsvd025;
>   	/*--- long word 3 ----*/
>   	unsigned char qos_en;    /*1: QoS enable*/
> -	unsigned char bw_40MHz_en;   /*1: 40MHz BW enable*/
> +	unsigned char bw_40mhz_en;   /*1: 40MHz BW enable*/
>   	unsigned char AMSDU2AMPDU_en;   /*1: 4181 convert AMSDU to AMPDU,
>   					 * 0: disable
>   					 */
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index bfb27f902753..0e5b07ad5a8f 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -2331,7 +2331,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
>   		}
>   	}
>   
> -	/* to disable 40M Hz support while gd_bw_40MHz_en = 0 */
> +	/* to disable 40 MHz support while gd_bw_40mhz_en = 0 */
>   	if (channel > 14) {
>   		if ((pregistrypriv->bw_mode & 0xf0) > 0)
>   			cbw40_enable = 1;


  reply	other threads:[~2024-03-23 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-23  0:17 [PATCH] staging: rtl8712: Rename variable bw_40MHz_en Lautaro Javier Fernandez Pricco
2024-03-23 22:30 ` Philipp Hortmann [this message]
     [not found]   ` <WH1VAS.9RZFLNEC6LFP3@ljfp.xyz>
2024-03-24 18:27     ` Philipp Hortmann

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=9d8f35f6-2d23-43bf-9ac5-c88e4f65609e@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=ljfp@ljfp.xyz \
    --cc=outreachy@lists.linux.dev \
    /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