Re: [PATCH] staging: rtl8712: Rename variable bw_40MHz_en
Philipp Hortmann <[email protected]>
| Newsgroups | dev.linux.lists.outreachy,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > --- > 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;