linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: r8188eu: core: Avoid CamelCase: <bEnterPS>
@ 2022-02-09 20:57 Leonardo Araujo
  2022-02-10  6:53 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Leonardo Araujo @ 2022-02-09 20:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-staging, Leonardo Araujo

Fixed a coding style issue.

Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_cmd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index e42119e16284..4ec4da6d3078 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -880,7 +880,7 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan)
 
 static void traffic_status_watchdog(struct adapter *padapter)
 {
-	u8	bEnterPS;
+	u8	b_enter_ps;
 	u8	bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false;
 	u8	bHigherBusyTraffic = false, bHigherBusyRxTraffic = false, bHigherBusyTxTraffic = false;
 	struct mlme_priv		*pmlmepriv = &padapter->mlmepriv;
@@ -913,12 +913,12 @@ static void traffic_status_watchdog(struct adapter *padapter)
 		/*  check traffic for  powersaving. */
 		if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod + pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
 		    (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2))
-			bEnterPS = false;
+			b_enter_ps = false;
 		else
-			bEnterPS = true;
+			b_enter_ps = true;
 
 		/*  LeisurePS only work in infra mode. */
-		if (bEnterPS)
+		if (b_enter_ps)
 			LPS_Enter(padapter);
 		else
 			LPS_Leave(padapter);
-- 
2.29.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Staging: r8188eu: core: Avoid CamelCase: <bEnterPS>
  2022-02-09 20:57 [PATCH] Staging: r8188eu: core: Avoid CamelCase: <bEnterPS> Leonardo Araujo
@ 2022-02-10  6:53 ` Greg KH
  2022-02-10 22:14   ` Leonardo Araujo
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2022-02-10  6:53 UTC (permalink / raw)
  To: Leonardo Araujo; +Cc: linux-kernel, linux-staging

On Wed, Feb 09, 2022 at 05:57:40PM -0300, Leonardo Araujo wrote:
> Fixed a coding style issue.

Please read the kernel documentation for how to write better subject
lines and changelog texts.  These need a lot of work, you can't just put
the checkpatch message in the subject and then nothing in the changelog
body.

> 
> Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
> ---
>  drivers/staging/r8188eu/core/rtw_cmd.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index e42119e16284..4ec4da6d3078 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -880,7 +880,7 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan)
>  
>  static void traffic_status_watchdog(struct adapter *padapter)
>  {
> -	u8	bEnterPS;
> +	u8	b_enter_ps;

No, think about what you are changing here.  Why keep the "b" at all?
What does this variable name?  Why was there a "b" to start with?


>  	u8	bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false;


What about all of these other variables, why ignore them and not send a
patch series to fix them all up?

Remember where the "b" comes from, this is "hungarian notation" and is
trying to describe the type of the variable, which makes no sense in
this century.  Please do not keep it around for no reason at all.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Staging: r8188eu: core: Avoid CamelCase: <bEnterPS>
  2022-02-10  6:53 ` Greg KH
@ 2022-02-10 22:14   ` Leonardo Araujo
  0 siblings, 0 replies; 3+ messages in thread
From: Leonardo Araujo @ 2022-02-10 22:14 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, linux-staging

Mr. Greg,

first of all, thank you for your time and review. I am learning a lot
from your responses since I started contributing, after I came across
a YouTube video of one of your presentations on how to contribute to
the Linux kernel. I will study the documentation more in depth and
send a proper patch series as you requested.

Best regards,

Leonardo Araujo

Atenciosamente,

Eng. M.Sc. Leonardo A. de Araujo


On Thu, Feb 10, 2022 at 3:53 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Wed, Feb 09, 2022 at 05:57:40PM -0300, Leonardo Araujo wrote:
> > Fixed a coding style issue.
>
> Please read the kernel documentation for how to write better subject
> lines and changelog texts.  These need a lot of work, you can't just put
> the checkpatch message in the subject and then nothing in the changelog
> body.
>
> >
> > Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
> > ---
> >  drivers/staging/r8188eu/core/rtw_cmd.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> > index e42119e16284..4ec4da6d3078 100644
> > --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> > +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> > @@ -880,7 +880,7 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan)
> >
> >  static void traffic_status_watchdog(struct adapter *padapter)
> >  {
> > -     u8      bEnterPS;
> > +     u8      b_enter_ps;
>
> No, think about what you are changing here.  Why keep the "b" at all?
> What does this variable name?  Why was there a "b" to start with?
>
>
> >       u8      bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false;
>
>
> What about all of these other variables, why ignore them and not send a
> patch series to fix them all up?
>
> Remember where the "b" comes from, this is "hungarian notation" and is
> trying to describe the type of the variable, which makes no sense in
> this century.  Please do not keep it around for no reason at all.
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-10 22:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 20:57 [PATCH] Staging: r8188eu: core: Avoid CamelCase: <bEnterPS> Leonardo Araujo
2022-02-10  6:53 ` Greg KH
2022-02-10 22:14   ` Leonardo Araujo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).