[PATCH v3] staging: rtl8723bs: Rename variables

Erick Karanja posted 1 patch 8 months, 4 weeks ago
There is a newer version of this series
drivers/staging/rtl8723bs/core/rtw_btcoex.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
[PATCH v3] staging: rtl8723bs: Rename variables
Posted by Erick Karanja 8 months, 4 weeks ago
Rename the variable `mediaStatus` to `media_status` and variable
`lpsVal` to `lps_val` to adhere to Linux kernel coding
standards by using snake_case instead of CamelCase.

Fixes checkpatch.pl warning:
	CHECK: Avoid CamelCase: <mediaStatus>
	CHECK: Avoid CamelCase: <lpsVal>

Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
index d54095f50113..f4b19ef7b341 100644
--- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
+++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
@@ -8,14 +8,14 @@
 #include <rtw_btcoex.h>
 #include <hal_btcoex.h>
 
-void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 mediaStatus)
+void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
 {
-	if ((mediaStatus == RT_MEDIA_CONNECT)
+	if ((media_status == RT_MEDIA_CONNECT)
 		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
 		rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
 	}
 
-	hal_btcoex_MediaStatusNotify(padapter, mediaStatus);
+	hal_btcoex_MediaStatusNotify(padapter, media_status);
 }
 
 void rtw_btcoex_HaltNotify(struct adapter *padapter)
@@ -52,14 +52,14 @@ void rtw_btcoex_RejectApAggregatedPacket(struct adapter *padapter, u8 enable)
 void rtw_btcoex_LPS_Enter(struct adapter *padapter)
 {
 	struct pwrctrl_priv *pwrpriv;
-	u8 lpsVal;
+	u8 lps_val;
 
 
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	pwrpriv->bpower_saving = true;
-	lpsVal = hal_btcoex_LpsVal(padapter);
-	rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lpsVal, "BTCOEX");
+	lps_val = hal_btcoex_LpsVal(padapter);
+	rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lps_val, "BTCOEX");
 }
 
 void rtw_btcoex_LPS_Leave(struct adapter *padapter)
-- 
2.43.0
Re: [PATCH v3] staging: rtl8723bs: Rename variables
Posted by Samuel Abraham 8 months, 4 weeks ago
On Wed, Mar 26, 2025 at 8:29 AM Erick Karanja <karanja99erick@gmail.com> wrote:
>
> Rename the variable `mediaStatus` to `media_status` and variable
> `lpsVal` to `lps_val` to adhere to Linux kernel coding
> standards by using snake_case instead of CamelCase.
>
> Fixes checkpatch.pl warning:
>         CHECK: Avoid CamelCase: <mediaStatus>
>         CHECK: Avoid CamelCase: <lpsVal>
>
> Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
> ---

Hello Erick, I think what Julia is explaining is that you should write
your changes in v2 here where I inserted
this message to you. Not to remove it entirely. Am I right Julia?

Adekunle

>  drivers/staging/rtl8723bs/core/rtw_btcoex.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> index d54095f50113..f4b19ef7b341 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> @@ -8,14 +8,14 @@
>  #include <rtw_btcoex.h>
>  #include <hal_btcoex.h>
>
> -void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 mediaStatus)
> +void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
>  {
> -       if ((mediaStatus == RT_MEDIA_CONNECT)
> +       if ((media_status == RT_MEDIA_CONNECT)
>                 && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
>                 rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
>         }
>
> -       hal_btcoex_MediaStatusNotify(padapter, mediaStatus);
> +       hal_btcoex_MediaStatusNotify(padapter, media_status);
>  }
>
>  void rtw_btcoex_HaltNotify(struct adapter *padapter)
> @@ -52,14 +52,14 @@ void rtw_btcoex_RejectApAggregatedPacket(struct adapter *padapter, u8 enable)
>  void rtw_btcoex_LPS_Enter(struct adapter *padapter)
>  {
>         struct pwrctrl_priv *pwrpriv;
> -       u8 lpsVal;
> +       u8 lps_val;
>
>
>         pwrpriv = adapter_to_pwrctl(padapter);
>
>         pwrpriv->bpower_saving = true;
> -       lpsVal = hal_btcoex_LpsVal(padapter);
> -       rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lpsVal, "BTCOEX");
> +       lps_val = hal_btcoex_LpsVal(padapter);
> +       rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lps_val, "BTCOEX");
>  }
>
>  void rtw_btcoex_LPS_Leave(struct adapter *padapter)
> --
> 2.43.0
>
>
Re: [PATCH v3] staging: rtl8723bs: Rename variables
Posted by Julia Lawall 8 months, 4 weeks ago

On Wed, 26 Mar 2025, Samuel Abraham wrote:

> On Wed, Mar 26, 2025 at 8:29 AM Erick Karanja <karanja99erick@gmail.com> wrote:
> >
> > Rename the variable `mediaStatus` to `media_status` and variable
> > `lpsVal` to `lps_val` to adhere to Linux kernel coding
> > standards by using snake_case instead of CamelCase.
> >
> > Fixes checkpatch.pl warning:
> >         CHECK: Avoid CamelCase: <mediaStatus>
> >         CHECK: Avoid CamelCase: <lpsVal>
> >
> > Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
> > ---
>
> Hello Erick, I think what Julia is explaining is that you should write
> your changes in v2 here where I inserted
> this message to you. Not to remove it entirely. Am I right Julia?

Yes, that is correct.  It should be here.

thanks,
julia

>
> Adekunle
>
> >  drivers/staging/rtl8723bs/core/rtw_btcoex.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> > index d54095f50113..f4b19ef7b341 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> > @@ -8,14 +8,14 @@
> >  #include <rtw_btcoex.h>
> >  #include <hal_btcoex.h>
> >
> > -void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 mediaStatus)
> > +void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
> >  {
> > -       if ((mediaStatus == RT_MEDIA_CONNECT)
> > +       if ((media_status == RT_MEDIA_CONNECT)
> >                 && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
> >                 rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
> >         }
> >
> > -       hal_btcoex_MediaStatusNotify(padapter, mediaStatus);
> > +       hal_btcoex_MediaStatusNotify(padapter, media_status);
> >  }
> >
> >  void rtw_btcoex_HaltNotify(struct adapter *padapter)
> > @@ -52,14 +52,14 @@ void rtw_btcoex_RejectApAggregatedPacket(struct adapter *padapter, u8 enable)
> >  void rtw_btcoex_LPS_Enter(struct adapter *padapter)
> >  {
> >         struct pwrctrl_priv *pwrpriv;
> > -       u8 lpsVal;
> > +       u8 lps_val;
> >
> >
> >         pwrpriv = adapter_to_pwrctl(padapter);
> >
> >         pwrpriv->bpower_saving = true;
> > -       lpsVal = hal_btcoex_LpsVal(padapter);
> > -       rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lpsVal, "BTCOEX");
> > +       lps_val = hal_btcoex_LpsVal(padapter);
> > +       rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lps_val, "BTCOEX");
> >  }
> >
> >  void rtw_btcoex_LPS_Leave(struct adapter *padapter)
> > --
> > 2.43.0
> >
> >
>
>