DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] staging: rtl8723bs: include: Fix coding style errors
@ 2020-07-26  8:02 Aditya Jain
  2020-07-26  8:26 ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Aditya Jain @ 2020-07-26  8:02 UTC (permalink / raw)
  To: gregkh; +Cc: devel, hdegoede, Aditya Jain, linux-kernel, Larry.Finger

Fixing ERROR: "foo *	bar" should be "foo *bar" in hal_phy_cfg.h
as reported by checkpatch.pl

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 .../staging/rtl8723bs/include/hal_phy_cfg.h    | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 419ddb0733aa..fd5f377bad4f 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -42,7 +42,7 @@ u32 	Data
 
 u32
 PHY_QueryRFReg_8723B(
-struct adapter *		Adapter,
+struct adapter 		*Adapter,
 u8 		eRFPath,
 u32 			RegAddr,
 u32 			BitMask
@@ -50,7 +50,7 @@ u32 			BitMask
 
 void
 PHY_SetRFReg_8723B(
-struct adapter *		Adapter,
+struct adapter 		*Adapter,
 u8 		eRFPath,
 u32 			RegAddr,
 u32 			BitMask,
@@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);
 
 void
 PHY_SetTxPowerIndex(
-struct adapter *		Adapter,
+struct adapter 			*Adapter,
 u32 				PowerIndex,
 u8 			RFPath,
 u8 			Rate
@@ -74,7 +74,7 @@ u8 			Rate
 
 u8
 PHY_GetTxPowerIndex(
-struct adapter *		padapter,
+struct adapter 			*padapter,
 u8 			RFPath,
 u8 			Rate,
 enum CHANNEL_WIDTH		BandWidth,
@@ -83,19 +83,19 @@ u8 			Channel
 
 void
 PHY_GetTxPowerLevel8723B(
-struct adapter *	Adapter,
-	s32*			powerlevel
+struct adapter 			*Adapter,
+	s32			*powerlevel
 	);
 
 void
 PHY_SetTxPowerLevel8723B(
-struct adapter *	Adapter,
+struct adapter 		*Adapter,
 u8 	channel
 	);
 
 void
 PHY_SetBWMode8723B(
-struct adapter *			Adapter,
+struct adapter 				*Adapter,
 enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
 unsigned char 			Offset		/*  Upper, Lower, or Don't care */
 );
@@ -108,7 +108,7 @@ u8 channel
 
 void
 PHY_SetSwChnlBWMode8723B(
-struct adapter *		Adapter,
+struct adapter 		*Adapter,
 u8 			channel,
 enum CHANNEL_WIDTH		Bandwidth,
 u8 			Offset40,
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors
  2020-07-26  8:02 [PATCH] staging: rtl8723bs: include: Fix coding style errors Aditya Jain
@ 2020-07-26  8:26 ` Greg KH
  2020-07-26  8:40   ` Aditya Jain
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2020-07-26  8:26 UTC (permalink / raw)
  To: Aditya Jain; +Cc: devel, hdegoede, linux-kernel, Larry.Finger

On Sun, Jul 26, 2020 at 01:32:15PM +0530, Aditya Jain wrote:
> Fixing ERROR: "foo *	bar" should be "foo *bar" in hal_phy_cfg.h
> as reported by checkpatch.pl
> 
> Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
> ---
>  .../staging/rtl8723bs/include/hal_phy_cfg.h    | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> index 419ddb0733aa..fd5f377bad4f 100644
> --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> @@ -42,7 +42,7 @@ u32 	Data
>  
>  u32
>  PHY_QueryRFReg_8723B(
> -struct adapter *		Adapter,
> +struct adapter 		*Adapter,
>  u8 		eRFPath,
>  u32 			RegAddr,
>  u32 			BitMask

Ick, these are all horrid.  How about just making these all on a single
line like most functions have them instead of this one cleanup?

Same for the other changes you made in this file.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors
  2020-07-26  8:26 ` Greg KH
@ 2020-07-26  8:40   ` Aditya Jain
  2020-07-26 10:53     ` [PATCH v2] staging: rtl8723bs: include: Fix coding style issues Aditya Jain
                       ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-26  8:40 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, hdegoede, linux-kernel, Larry.Finger

On Sun, Jul 26, 2020 at 1:56 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Sun, Jul 26, 2020 at 01:32:15PM +0530, Aditya Jain wrote:
> > Fixing ERROR: "foo *  bar" should be "foo *bar" in hal_phy_cfg.h
> > as reported by checkpatch.pl
> >
> > Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
> > ---
> >  .../staging/rtl8723bs/include/hal_phy_cfg.h    | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> > index 419ddb0733aa..fd5f377bad4f 100644
> > --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> > +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> > @@ -42,7 +42,7 @@ u32         Data
> >
> >  u32
> >  PHY_QueryRFReg_8723B(
> > -struct adapter *             Adapter,
> > +struct adapter               *Adapter,
> >  u8           eRFPath,
> >  u32                  RegAddr,
> >  u32                  BitMask
>
> Ick, these are all horrid.  How about just making these all on a single
> line like most functions have them instead of this one cleanup?
>
> Same for the other changes you made in this file.
>
> thanks,
>
> greg k-h

Agreed. I'll clean it up.

Regards,
Aditya Jain
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v2] staging: rtl8723bs: include: Fix coding style issues
  2020-07-26  8:40   ` Aditya Jain
@ 2020-07-26 10:53     ` Aditya Jain
  2020-07-26 10:59       ` Greg KH
  2020-07-26 14:18     ` Fix code style issues in staging Aditya Jain
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 10:53 UTC (permalink / raw)
  To: gregkh; +Cc: devel, hdegoede, Aditya Jain, linux-kernel, Larry.Finger

Cleaning messy function declartions and fixing code style
errors in hal_phy_cfg.h as reported by checkpatch.pl

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 .../staging/rtl8723bs/include/hal_phy_cfg.h   | 118 +++++-------------
 1 file changed, 33 insertions(+), 85 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 419ddb0733aa..2f123903279c 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -8,54 +8,31 @@
 #define __INC_HAL8723BPHYCFG_H__
 
 /*--------------------------Define Parameters-------------------------------*/
-#define LOOP_LIMIT				5
-#define MAX_STALL_TIME			50		/* us */
+#define LOOP_LIMIT		5
+#define MAX_STALL_TIME		50	/* us */
 #define AntennaDiversityValue	0x80	/* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */
 #define MAX_TXPWR_IDX_NMODE_92S	63
-#define Reset_Cnt_Limit			3
-
-#define MAX_AGGR_NUM	0x07
+#define Reset_Cnt_Limit		3
 
+#define MAX_AGGR_NUM 0x07
 
 /*--------------------------Define Parameters End-------------------------------*/
 
-
 /*------------------------------Define structure----------------------------*/
 
 /*------------------------------Define structure End----------------------------*/
 
 /*--------------------------Exported Function prototype---------------------*/
-u32
-PHY_QueryBBReg_8723B(
-struct adapter *Adapter,
-u32 	RegAddr,
-u32 	BitMask
-	);
-
-void
-PHY_SetBBReg_8723B(
-struct adapter *Adapter,
-u32 	RegAddr,
-u32 	BitMask,
-u32 	Data
-	);
-
-u32
-PHY_QueryRFReg_8723B(
-struct adapter *		Adapter,
-u8 		eRFPath,
-u32 			RegAddr,
-u32 			BitMask
-	);
-
-void
-PHY_SetRFReg_8723B(
-struct adapter *		Adapter,
-u8 		eRFPath,
-u32 			RegAddr,
-u32 			BitMask,
-u32 			Data
-	);
+u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask);
+
+void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr,
+			u32 BitMask, u32 Data);
+
+u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
+			 u32 RegAddr, u32 BitMask);
+
+void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
+			u32 RegAddr, u32 BitMask, u32 Data);
 
 /* MAC/BB/RF HAL config */
 int PHY_BBConfig8723B(struct adapter *Adapter);
@@ -64,57 +41,28 @@ int PHY_RFConfig8723B(struct adapter *Adapter);
 
 s32 PHY_MACConfig8723B(struct adapter *padapter);
 
-void
-PHY_SetTxPowerIndex(
-struct adapter *		Adapter,
-u32 				PowerIndex,
-u8 			RFPath,
-u8 			Rate
-	);
-
-u8
-PHY_GetTxPowerIndex(
-struct adapter *		padapter,
-u8 			RFPath,
-u8 			Rate,
-enum CHANNEL_WIDTH		BandWidth,
-u8 			Channel
-	);
-
-void
-PHY_GetTxPowerLevel8723B(
-struct adapter *	Adapter,
-	s32*			powerlevel
-	);
-
-void
-PHY_SetTxPowerLevel8723B(
-struct adapter *	Adapter,
-u8 	channel
-	);
-
-void
-PHY_SetBWMode8723B(
-struct adapter *			Adapter,
-enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
-unsigned char 			Offset		/*  Upper, Lower, or Don't care */
-);
+void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
+			 u8 RFPath, u8 Rate);
 
-void
-PHY_SwChnl8723B(/*  Call after initialization */
-struct adapter *Adapter,
-u8 channel
-	);
-
-void
-PHY_SetSwChnlBWMode8723B(
-struct adapter *		Adapter,
-u8 			channel,
-enum CHANNEL_WIDTH		Bandwidth,
-u8 			Offset40,
-u8 			Offset80
+u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate,
+			enum CHANNEL_WIDTH BandWidth, u8 Channel);
+
+void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel);
+
+void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel);
+
+void PHY_SetBWMode8723B(struct adapter *Adapter,
+			enum CHANNEL_WIDTH Bandwidth,	/*  20M or 40M */
+			unsigned char Offset	/*  Upper, Lower, or Don't care */
 );
 
+/*  Call after initialization */
+void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel);
+
+void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel,
+				enum CHANNEL_WIDTH Bandwidth,
+				u8 Offset40, u8 Offset80);
+
 /*--------------------------Exported Function prototype End---------------------*/
 
 #endif
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH v2] staging: rtl8723bs: include: Fix coding style issues
  2020-07-26 10:53     ` [PATCH v2] staging: rtl8723bs: include: Fix coding style issues Aditya Jain
@ 2020-07-26 10:59       ` Greg KH
  0 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2020-07-26 10:59 UTC (permalink / raw)
  To: Aditya Jain; +Cc: devel, hdegoede, linux-kernel, Larry.Finger

On Sun, Jul 26, 2020 at 04:23:02PM +0530, Aditya Jain wrote:
> Cleaning messy function declartions and fixing code style
> errors in hal_phy_cfg.h as reported by checkpatch.pl
> 
> Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
> ---
>  .../staging/rtl8723bs/include/hal_phy_cfg.h   | 118 +++++-------------
>  1 file changed, 33 insertions(+), 85 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> index 419ddb0733aa..2f123903279c 100644
> --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> @@ -8,54 +8,31 @@
>  #define __INC_HAL8723BPHYCFG_H__
>  
>  /*--------------------------Define Parameters-------------------------------*/
> -#define LOOP_LIMIT				5
> -#define MAX_STALL_TIME			50		/* us */
> +#define LOOP_LIMIT		5
> +#define MAX_STALL_TIME		50	/* us */
>  #define AntennaDiversityValue	0x80	/* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */
>  #define MAX_TXPWR_IDX_NMODE_92S	63
> -#define Reset_Cnt_Limit			3
> -
> -#define MAX_AGGR_NUM	0x07
> +#define Reset_Cnt_Limit		3
>  
> +#define MAX_AGGR_NUM 0x07
>  
>  /*--------------------------Define Parameters End-------------------------------*/
>  
> -
>  /*------------------------------Define structure----------------------------*/
>  
>  /*------------------------------Define structure End----------------------------*/
>  
>  /*--------------------------Exported Function prototype---------------------*/
> -u32
> -PHY_QueryBBReg_8723B(
> -struct adapter *Adapter,
> -u32 	RegAddr,
> -u32 	BitMask
> -	);
> -
> -void
> -PHY_SetBBReg_8723B(
> -struct adapter *Adapter,
> -u32 	RegAddr,
> -u32 	BitMask,
> -u32 	Data
> -	);
> -
> -u32
> -PHY_QueryRFReg_8723B(
> -struct adapter *		Adapter,
> -u8 		eRFPath,
> -u32 			RegAddr,
> -u32 			BitMask
> -	);
> -
> -void
> -PHY_SetRFReg_8723B(
> -struct adapter *		Adapter,
> -u8 		eRFPath,
> -u32 			RegAddr,
> -u32 			BitMask,
> -u32 			Data
> -	);
> +u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask);
> +
> +void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr,
> +			u32 BitMask, u32 Data);
> +
> +u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
> +			 u32 RegAddr, u32 BitMask);
> +
> +void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
> +			u32 RegAddr, u32 BitMask, u32 Data);
>  
>  /* MAC/BB/RF HAL config */
>  int PHY_BBConfig8723B(struct adapter *Adapter);
> @@ -64,57 +41,28 @@ int PHY_RFConfig8723B(struct adapter *Adapter);
>  
>  s32 PHY_MACConfig8723B(struct adapter *padapter);
>  
> -void
> -PHY_SetTxPowerIndex(
> -struct adapter *		Adapter,
> -u32 				PowerIndex,
> -u8 			RFPath,
> -u8 			Rate
> -	);
> -
> -u8
> -PHY_GetTxPowerIndex(
> -struct adapter *		padapter,
> -u8 			RFPath,
> -u8 			Rate,
> -enum CHANNEL_WIDTH		BandWidth,
> -u8 			Channel
> -	);
> -
> -void
> -PHY_GetTxPowerLevel8723B(
> -struct adapter *	Adapter,
> -	s32*			powerlevel
> -	);
> -
> -void
> -PHY_SetTxPowerLevel8723B(
> -struct adapter *	Adapter,
> -u8 	channel
> -	);
> -
> -void
> -PHY_SetBWMode8723B(
> -struct adapter *			Adapter,
> -enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
> -unsigned char 			Offset		/*  Upper, Lower, or Don't care */
> -);
> +void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
> +			 u8 RFPath, u8 Rate);
>  
> -void
> -PHY_SwChnl8723B(/*  Call after initialization */
> -struct adapter *Adapter,
> -u8 channel
> -	);
> -
> -void
> -PHY_SetSwChnlBWMode8723B(
> -struct adapter *		Adapter,
> -u8 			channel,
> -enum CHANNEL_WIDTH		Bandwidth,
> -u8 			Offset40,
> -u8 			Offset80
> +u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate,
> +			enum CHANNEL_WIDTH BandWidth, u8 Channel);
> +
> +void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel);
> +
> +void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel);
> +
> +void PHY_SetBWMode8723B(struct adapter *Adapter,
> +			enum CHANNEL_WIDTH Bandwidth,	/*  20M or 40M */
> +			unsigned char Offset	/*  Upper, Lower, or Don't care */
>  );
>  
> +/*  Call after initialization */
> +void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel);
> +
> +void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel,
> +				enum CHANNEL_WIDTH Bandwidth,
> +				u8 Offset40, u8 Offset80);
> +
>  /*--------------------------Exported Function prototype End---------------------*/
>  
>  #endif
> -- 
> 2.25.1
> 
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Fix code style issues in staging
  2020-07-26  8:40   ` Aditya Jain
  2020-07-26 10:53     ` [PATCH v2] staging: rtl8723bs: include: Fix coding style issues Aditya Jain
@ 2020-07-26 14:18     ` Aditya Jain
  2020-07-26 14:20       ` [PATCH v3 1/4] staging: rtl8723bs: include: Fix coding style errors Aditya Jain
  2020-07-26 18:03     ` [PATCH] staging: rtl8723bs: include: Fix coding style errors Larry Finger
  2020-07-29 19:21     ` [PATCH v4 0/3] Fix coding style issues in staging Aditya Jain
  3 siblings, 1 reply; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 14:18 UTC (permalink / raw)
  To: gregkh; +Cc: devel, hdegoede, linux-kernel, Larry.Finger

Hi all,

The following series of patches fixes code style issues in 
the file staging/drivers/rtl8723bs/include/hal_phy_cfg.h

Regards,
Aditya Jain

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v3 1/4] staging: rtl8723bs: include: Fix coding style errors
  2020-07-26 14:18     ` Fix code style issues in staging Aditya Jain
@ 2020-07-26 14:20       ` Aditya Jain
  2020-07-26 14:20         ` [PATCH v3 2/4] staging: rtl8723bs: include: Clean up function declations Aditya Jain
                           ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 14:20 UTC (permalink / raw)
  To: gregkh; +Cc: devel, hdegoede, Aditya Jain, linux-kernel, Larry.Finger

Fixing ERROR: "foo *	bar" should be "foo *bar" in hal_phy_cfg.h
as reported by checkpatch.pl

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 .../staging/rtl8723bs/include/hal_phy_cfg.h    | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 419ddb0733aa..7e48abc4c760 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -42,7 +42,7 @@ u32 	Data
 
 u32
 PHY_QueryRFReg_8723B(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u8 		eRFPath,
 u32 			RegAddr,
 u32 			BitMask
@@ -50,7 +50,7 @@ u32 			BitMask
 
 void
 PHY_SetRFReg_8723B(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u8 		eRFPath,
 u32 			RegAddr,
 u32 			BitMask,
@@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);
 
 void
 PHY_SetTxPowerIndex(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u32 				PowerIndex,
 u8 			RFPath,
 u8 			Rate
@@ -74,7 +74,7 @@ u8 			Rate
 
 u8
 PHY_GetTxPowerIndex(
-struct adapter *		padapter,
+struct adapter *padapter,
 u8 			RFPath,
 u8 			Rate,
 enum CHANNEL_WIDTH		BandWidth,
@@ -83,19 +83,19 @@ u8 			Channel
 
 void
 PHY_GetTxPowerLevel8723B(
-struct adapter *	Adapter,
-	s32*			powerlevel
+struct adapter *Adapter,
+	s32 *powerlevel
 	);
 
 void
 PHY_SetTxPowerLevel8723B(
-struct adapter *	Adapter,
+struct adapter *Adapter,
 u8 	channel
 	);
 
 void
 PHY_SetBWMode8723B(
-struct adapter *			Adapter,
+struct adapter *Adapter,
 enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
 unsigned char 			Offset		/*  Upper, Lower, or Don't care */
 );
@@ -108,7 +108,7 @@ u8 channel
 
 void
 PHY_SetSwChnlBWMode8723B(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u8 			channel,
 enum CHANNEL_WIDTH		Bandwidth,
 u8 			Offset40,
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v3 2/4] staging: rtl8723bs: include: Clean up function declations
  2020-07-26 14:20       ` [PATCH v3 1/4] staging: rtl8723bs: include: Fix coding style errors Aditya Jain
@ 2020-07-26 14:20         ` Aditya Jain
  2020-07-26 14:20         ` [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations Aditya Jain
  2020-07-26 14:20         ` [PATCH v3 4/4] staging: rtl8723bs: include: Align macro definitions Aditya Jain
  2 siblings, 0 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 14:20 UTC (permalink / raw)
  To: gregkh; +Cc: devel, hdegoede, Aditya Jain, linux-kernel, Larry.Finger

Clean up multiline function declartions in hal_phy_cfg.h
to improve code readablility

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 .../staging/rtl8723bs/include/hal_phy_cfg.h   | 44 ++++---------------
 1 file changed, 9 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 7e48abc4c760..3cec06e9f359 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -25,37 +25,16 @@
 /*------------------------------Define structure End----------------------------*/
 
 /*--------------------------Exported Function prototype---------------------*/
-u32
-PHY_QueryBBReg_8723B(
-struct adapter *Adapter,
-u32 	RegAddr,
-u32 	BitMask
-	);
+u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask);
 
-void
-PHY_SetBBReg_8723B(
-struct adapter *Adapter,
-u32 	RegAddr,
-u32 	BitMask,
-u32 	Data
-	);
+void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr,
+			u32 BitMask, u32 Data);
 
-u32
-PHY_QueryRFReg_8723B(
-struct adapter *Adapter,
-u8 		eRFPath,
-u32 			RegAddr,
-u32 			BitMask
-	);
+u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
+			 u32 RegAddr, u32 BitMask);
 
-void
-PHY_SetRFReg_8723B(
-struct adapter *Adapter,
-u8 		eRFPath,
-u32 			RegAddr,
-u32 			BitMask,
-u32 			Data
-	);
+void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
+			u32 RegAddr, u32 BitMask, u32 Data);
 
 /* MAC/BB/RF HAL config */
 int PHY_BBConfig8723B(struct adapter *Adapter);
@@ -64,13 +43,8 @@ int PHY_RFConfig8723B(struct adapter *Adapter);
 
 s32 PHY_MACConfig8723B(struct adapter *padapter);
 
-void
-PHY_SetTxPowerIndex(
-struct adapter *Adapter,
-u32 				PowerIndex,
-u8 			RFPath,
-u8 			Rate
-	);
+void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
+			 u8 RFPath, u8 Rate);
 
 u8
 PHY_GetTxPowerIndex(
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
  2020-07-26 14:20       ` [PATCH v3 1/4] staging: rtl8723bs: include: Fix coding style errors Aditya Jain
  2020-07-26 14:20         ` [PATCH v3 2/4] staging: rtl8723bs: include: Clean up function declations Aditya Jain
@ 2020-07-26 14:20         ` Aditya Jain
  2020-07-26 15:02           ` Greg KH
  2020-07-26 14:20         ` [PATCH v3 4/4] staging: rtl8723bs: include: Align macro definitions Aditya Jain
  2 siblings, 1 reply; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 14:20 UTC (permalink / raw)
  To: gregkh; +Cc: devel, hdegoede, Aditya Jain, linux-kernel, Larry.Finger

Cleaning up messy multiline function declarations in hal_phy_cfg.h

This patch is a continuation of patch "Clean up function declarations"

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 .../staging/rtl8723bs/include/hal_phy_cfg.h   | 56 ++++++-------------
 1 file changed, 16 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 3cec06e9f359..2b059c9c7851 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -46,49 +46,25 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);
 void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
 			 u8 RFPath, u8 Rate);
 
-u8
-PHY_GetTxPowerIndex(
-struct adapter *padapter,
-u8 			RFPath,
-u8 			Rate,
-enum CHANNEL_WIDTH		BandWidth,
-u8 			Channel
-	);
-
-void
-PHY_GetTxPowerLevel8723B(
-struct adapter *Adapter,
-	s32 *powerlevel
-	);
-
-void
-PHY_SetTxPowerLevel8723B(
-struct adapter *Adapter,
-u8 	channel
-	);
-
-void
-PHY_SetBWMode8723B(
-struct adapter *Adapter,
-enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
-unsigned char 			Offset		/*  Upper, Lower, or Don't care */
-);
+u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate,
+			enum CHANNEL_WIDTH BandWidth, u8 Channel);
+
+void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel);
+
+void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel);
 
-void
-PHY_SwChnl8723B(/*  Call after initialization */
-struct adapter *Adapter,
-u8 channel
-	);
-
-void
-PHY_SetSwChnlBWMode8723B(
-struct adapter *Adapter,
-u8 			channel,
-enum CHANNEL_WIDTH		Bandwidth,
-u8 			Offset40,
-u8 			Offset80
+void PHY_SetBWMode8723B(struct adapter *Adapter,
+			enum CHANNEL_WIDTH Bandwidth,	/*  20M or 40M */
+			unsigned char Offset	/*  Upper, Lower, or Don't care */
 );
 
+/*  Call after initialization */
+void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel);
+
+void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel,
+				enum CHANNEL_WIDTH Bandwidth,
+				u8 Offset40, u8 Offset80);
+
 /*--------------------------Exported Function prototype End---------------------*/
 
 #endif
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v3 4/4] staging: rtl8723bs: include: Align macro definitions
  2020-07-26 14:20       ` [PATCH v3 1/4] staging: rtl8723bs: include: Fix coding style errors Aditya Jain
  2020-07-26 14:20         ` [PATCH v3 2/4] staging: rtl8723bs: include: Clean up function declations Aditya Jain
  2020-07-26 14:20         ` [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations Aditya Jain
@ 2020-07-26 14:20         ` Aditya Jain
  2 siblings, 0 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 14:20 UTC (permalink / raw)
  To: gregkh; +Cc: devel, hdegoede, Aditya Jain, linux-kernel, Larry.Finger

Adjust spacing in macro definitions to align them and improve
readbility

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 drivers/staging/rtl8723bs/include/hal_phy_cfg.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 2b059c9c7851..b3d5d24126e8 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -8,11 +8,11 @@
 #define __INC_HAL8723BPHYCFG_H__
 
 /*--------------------------Define Parameters-------------------------------*/
-#define LOOP_LIMIT				5
-#define MAX_STALL_TIME			50		/* us */
+#define LOOP_LIMIT		5
+#define MAX_STALL_TIME		50	/* us */
 #define AntennaDiversityValue	0x80	/* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */
 #define MAX_TXPWR_IDX_NMODE_92S	63
-#define Reset_Cnt_Limit			3
+#define Reset_Cnt_Limit		3
 
 #define MAX_AGGR_NUM	0x07
 
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
  2020-07-26 14:20         ` [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations Aditya Jain
@ 2020-07-26 15:02           ` Greg KH
  2020-07-26 17:15             ` Joe Perches
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2020-07-26 15:02 UTC (permalink / raw)
  To: Aditya Jain; +Cc: devel, hdegoede, linux-kernel, Larry.Finger

On Sun, Jul 26, 2020 at 07:50:12PM +0530, Aditya Jain wrote:
> Cleaning up messy multiline function declarations in hal_phy_cfg.h
> 
> This patch is a continuation of patch "Clean up function declarations"

This should be merged with that patch, no reason to make it separate.

> 
> Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
> ---
>  .../staging/rtl8723bs/include/hal_phy_cfg.h   | 56 ++++++-------------
>  1 file changed, 16 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> index 3cec06e9f359..2b059c9c7851 100644
> --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> @@ -46,49 +46,25 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);
>  void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
>  			 u8 RFPath, u8 Rate);
>  
> -u8
> -PHY_GetTxPowerIndex(
> -struct adapter *padapter,
> -u8 			RFPath,
> -u8 			Rate,
> -enum CHANNEL_WIDTH		BandWidth,
> -u8 			Channel
> -	);
> -
> -void
> -PHY_GetTxPowerLevel8723B(
> -struct adapter *Adapter,
> -	s32 *powerlevel
> -	);
> -
> -void
> -PHY_SetTxPowerLevel8723B(
> -struct adapter *Adapter,
> -u8 	channel
> -	);
> -
> -void
> -PHY_SetBWMode8723B(
> -struct adapter *Adapter,
> -enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
> -unsigned char 			Offset		/*  Upper, Lower, or Don't care */
> -);
> +u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate,
> +			enum CHANNEL_WIDTH BandWidth, u8 Channel);
> +
> +void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel);
> +
> +void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel);
>  
> -void
> -PHY_SwChnl8723B(/*  Call after initialization */
> -struct adapter *Adapter,
> -u8 channel
> -	);
> -
> -void
> -PHY_SetSwChnlBWMode8723B(
> -struct adapter *Adapter,
> -u8 			channel,
> -enum CHANNEL_WIDTH		Bandwidth,
> -u8 			Offset40,
> -u8 			Offset80
> +void PHY_SetBWMode8723B(struct adapter *Adapter,
> +			enum CHANNEL_WIDTH Bandwidth,	/*  20M or 40M */
> +			unsigned char Offset	/*  Upper, Lower, or Don't care */

Those comments should go at the top of the function declaration, in
kernel doc format.

thanks

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
  2020-07-26 15:02           ` Greg KH
@ 2020-07-26 17:15             ` Joe Perches
  2020-07-26 18:15               ` Aditya Jain
  0 siblings, 1 reply; 20+ messages in thread
From: Joe Perches @ 2020-07-26 17:15 UTC (permalink / raw)
  To: Greg KH, Aditya Jain; +Cc: devel, hdegoede, linux-kernel, Larry.Finger

On Sun, 2020-07-26 at 17:02 +0200, Greg KH wrote:
> On Sun, Jul 26, 2020 at 07:50:12PM +0530, Aditya Jain wrote:
> > Cleaning up messy multiline function declarations in hal_phy_cfg.h
[]
> > diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
[]
> > -void
> > -PHY_SetSwChnlBWMode8723B(
> > -struct adapter *Adapter,
> > -u8 			channel,
> > -enum CHANNEL_WIDTH		Bandwidth,
> > -u8 			Offset40,
> > -u8 			Offset80
> > +void PHY_SetBWMode8723B(struct adapter *Adapter,
> > +			enum CHANNEL_WIDTH Bandwidth,	/*  20M or 40M */
> > +			unsigned char Offset	/*  Upper, Lower, or Don't care */
> 
> Those comments should go at the top of the function declaration, in
> kernel doc format.

Not every external function needs kernel-doc.

This is a realtek staging driver that likely it will never be
moved out of staging.


_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors
  2020-07-26  8:40   ` Aditya Jain
  2020-07-26 10:53     ` [PATCH v2] staging: rtl8723bs: include: Fix coding style issues Aditya Jain
  2020-07-26 14:18     ` Fix code style issues in staging Aditya Jain
@ 2020-07-26 18:03     ` Larry Finger
  2020-07-26 18:29       ` Aditya Jain
  2020-07-29 19:21     ` [PATCH v4 0/3] Fix coding style issues in staging Aditya Jain
  3 siblings, 1 reply; 20+ messages in thread
From: Larry Finger @ 2020-07-26 18:03 UTC (permalink / raw)
  To: Aditya Jain, Greg KH; +Cc: devel, hdegoede, linux-kernel

On 7/26/20 3:40 AM, Aditya Jain wrote:
> On Sun, Jul 26, 2020 at 1:56 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>>
>> On Sun, Jul 26, 2020 at 01:32:15PM +0530, Aditya Jain wrote:
>>> Fixing ERROR: "foo *  bar" should be "foo *bar" in hal_phy_cfg.h
>>> as reported by checkpatch.pl
>>>
>>> Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
>>> ---
>>>   .../staging/rtl8723bs/include/hal_phy_cfg.h    | 18 +++++++++---------
>>>   1 file changed, 9 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
>>> index 419ddb0733aa..fd5f377bad4f 100644
>>> --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
>>> +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
>>> @@ -42,7 +42,7 @@ u32         Data
>>>
>>>   u32
>>>   PHY_QueryRFReg_8723B(
>>> -struct adapter *             Adapter,
>>> +struct adapter               *Adapter,
>>>   u8           eRFPath,
>>>   u32                  RegAddr,
>>>   u32                  BitMask
>>
>> Ick, these are all horrid.  How about just making these all on a single
>> line like most functions have them instead of this one cleanup?
>>
>> Same for the other changes you made in this file.
>>
>> thanks,
>>
>> greg k-h
> 
> Agreed. I'll clean it up.

While you are at it, drop the "include;" from the subject. For staging, the 
usual subject is of the form "staging: driver: thing being done". In your case 
"staging: rtl8723bs: Fix coding style errors". The directory of the files are 
not relevant.

I am also not in favor of the large white space between the variable type and 
the name, but that is probably the subject of separate patches.

Larry

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
  2020-07-26 17:15             ` Joe Perches
@ 2020-07-26 18:15               ` Aditya Jain
  2020-07-28 20:03                 ` Aditya Jain
  0 siblings, 1 reply; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 18:15 UTC (permalink / raw)
  To: Joe Perches; +Cc: devel, Greg KH, Larry.Finger, linux-kernel, hdegoede

On Sun, Jul 26, 2020 at 10:45 PM Joe Perches <joe@perches.com> wrote:
>
> On Sun, 2020-07-26 at 17:02 +0200, Greg KH wrote:
> > On Sun, Jul 26, 2020 at 07:50:12PM +0530, Aditya Jain wrote:
> > > Cleaning up messy multiline function declarations in hal_phy_cfg.h
> []
> > > diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> []
Ok, I'll merge this patch with the previous one. Had separated the two
to make the diffs smaller thinking they'll
be easier to review. But yeah, I get the point.
> > > -void
> > > -PHY_SetSwChnlBWMode8723B(
> > > -struct adapter *Adapter,
> > > -u8                         channel,
> > > -enum CHANNEL_WIDTH         Bandwidth,
> > > -u8                         Offset40,
> > > -u8                         Offset80
> > > +void PHY_SetBWMode8723B(struct adapter *Adapter,
> > > +                   enum CHANNEL_WIDTH Bandwidth,   /*  20M or 40M */
> > > +                   unsigned char Offset    /*  Upper, Lower, or Don't care */
> >
> > Those comments should go at the top of the function declaration, in
> > kernel doc format.
>
> Not every external function needs kernel-doc.
>
> This is a realtek staging driver that likely it will never be
> moved out of staging.
>
>
Should I just remove the comments then? Sorry, but I'm a newbie, and
not really sure what the function is or supposed to do.
I can try looking it up if kernel-doc is required here.

Regards,
Aditya Jain
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors
  2020-07-26 18:03     ` [PATCH] staging: rtl8723bs: include: Fix coding style errors Larry Finger
@ 2020-07-26 18:29       ` Aditya Jain
  0 siblings, 0 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-26 18:29 UTC (permalink / raw)
  To: Larry Finger, Greg KH; +Cc: devel, hdegoede, linux-kernel


On 26/07/20 11:33 pm, Larry Finger wrote:
> On 7/26/20 3:40 AM, Aditya Jain wrote:
>> On Sun, Jul 26, 2020 at 1:56 PM Greg KH <gregkh@linuxfoundation.org> 
>> wrote:
>>>
>>> On Sun, Jul 26, 2020 at 01:32:15PM +0530, Aditya Jain wrote:
>>>> Fixing ERROR: "foo *  bar" should be "foo *bar" in hal_phy_cfg.h
>>>> as reported by checkpatch.pl
>>>>
>>>> Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
>>>> ---
>>>>   .../staging/rtl8723bs/include/hal_phy_cfg.h    | 18 
>>>> +++++++++---------
>>>>   1 file changed, 9 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h 
>>>> b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
>>>> index 419ddb0733aa..fd5f377bad4f 100644
>>>> --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
>>>> +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
>>>> @@ -42,7 +42,7 @@ u32         Data
>>>>
>>>>   u32
>>>>   PHY_QueryRFReg_8723B(
>>>> -struct adapter *             Adapter,
>>>> +struct adapter               *Adapter,
>>>>   u8           eRFPath,
>>>>   u32                  RegAddr,
>>>>   u32                  BitMask
>>>
>>> Ick, these are all horrid.  How about just making these all on a single
>>> line like most functions have them instead of this one cleanup?
>>>
>>> Same for the other changes you made in this file.
>>>
>>> thanks,
>>>
>>> greg k-h
>>
>> Agreed. I'll clean it up.
>
> While you are at it, drop the "include;" from the subject. For 
> staging, the usual subject is of the form "staging: driver: thing 
> being done". In your case "staging: rtl8723bs: Fix coding style 
> errors". The directory of the files are not relevant.
Ok, I'll take care of this and update the subject in the next version of 
the Patch series.
>
> I am also not in favor of the large white space between the variable 
> type and the name, but that is probably the subject of separate patches.
>
I think, the v3 patch series resolves this.
> Larry
>

Regards,

Aditya Jain

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
  2020-07-26 18:15               ` Aditya Jain
@ 2020-07-28 20:03                 ` Aditya Jain
  0 siblings, 0 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-28 20:03 UTC (permalink / raw)
  To: Joe Perches; +Cc: devel, Greg KH, Larry Finger, linux-kernel, hdegoede

On Sun, Jul 26, 2020 at 11:45 PM Aditya Jain
<aditya.jainadityajain.jain@gmail.com> wrote:
>
> On Sun, Jul 26, 2020 at 10:45 PM Joe Perches <joe@perches.com> wrote:
> >
> > On Sun, 2020-07-26 at 17:02 +0200, Greg KH wrote:
> > > On Sun, Jul 26, 2020 at 07:50:12PM +0530, Aditya Jain wrote:
> > > > Cleaning up messy multiline function declarations in hal_phy_cfg.h
> > []
> > > > diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
> > []
> Ok, I'll merge this patch with the previous one. Had separated the two
> to make the diffs smaller thinking they'll
> be easier to review. But yeah, I get the point.
> > > > -void
> > > > -PHY_SetSwChnlBWMode8723B(
> > > > -struct adapter *Adapter,
> > > > -u8                         channel,
> > > > -enum CHANNEL_WIDTH         Bandwidth,
> > > > -u8                         Offset40,
> > > > -u8                         Offset80
> > > > +void PHY_SetBWMode8723B(struct adapter *Adapter,
> > > > +                   enum CHANNEL_WIDTH Bandwidth,   /*  20M or 40M */
> > > > +                   unsigned char Offset    /*  Upper, Lower, or Don't care */
> > >
> > > Those comments should go at the top of the function declaration, in
> > > kernel doc format.
> >
> > Not every external function needs kernel-doc.
> >
> > This is a realtek staging driver that likely it will never be
> > moved out of staging.
> >
> >
> Should I just remove the comments then? Sorry, but I'm a newbie, and
> not really sure what the function is or supposed to do.
> I can try looking it up if kernel-doc is required here.
Hi all,

Any directions on how I should continue?
>
> Regards,
> Aditya Jain

Thanks and Regards,
Aditya Jain
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v4 0/3] Fix coding style issues in staging
  2020-07-26  8:40   ` Aditya Jain
                       ` (2 preceding siblings ...)
  2020-07-26 18:03     ` [PATCH] staging: rtl8723bs: include: Fix coding style errors Larry Finger
@ 2020-07-29 19:21     ` Aditya Jain
  2020-07-29 19:21       ` [PATCH v4 1/3] staging: rtl8723bs: Fix coding style errors Aditya Jain
                         ` (2 more replies)
  3 siblings, 3 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-29 19:21 UTC (permalink / raw)
  To: gregkh; +Cc: devel, Aditya Jain, linux-kernel, hdegoede, joe, Larry.Finger

Hey everyone,

Following the comments received I've updated the patch.
The patch cleans up coding style issues in the file
drivers/staging/rtl8723bs/include/hal_phy_cfg.h

Changelog:

v1:
Fixed ERROR: "foo *	bar" should be "foo *bar" reported by
checkpatch.pl

v1 -> v2:
Cleaned up multiline function declarations as suggested
by Greg and adjusted spacing in macro definitions to align them.

v2 -> v3:
Broke the single patch in v2 into multiple patches with each
patch doing one single task.

v3 -> v4:
1. Corrected the patch subject following Larry's suggestion.    
2. Merged the second and third patches into one following Greg's 
comment.
3. Removed comments from the PHY_SetBWMode8723B function declaration.

Aditya Jain (3):
  staging: rtl8723bs: Fix coding style errors
  staging: rtl8723bs: Clean up function declations
  staging: rtl8723bs: Align macro definitions

 .../staging/rtl8723bs/include/hal_phy_cfg.h   | 116 +++++-------------
 1 file changed, 32 insertions(+), 84 deletions(-)

-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v4 1/3] staging: rtl8723bs: Fix coding style errors
  2020-07-29 19:21     ` [PATCH v4 0/3] Fix coding style issues in staging Aditya Jain
@ 2020-07-29 19:21       ` Aditya Jain
  2020-07-29 19:21       ` [PATCH v4 2/3] staging: rtl8723bs: Clean up function declations Aditya Jain
  2020-07-29 19:21       ` [PATCH v4 3/3] staging: rtl8723bs: Align macro definitions Aditya Jain
  2 siblings, 0 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-29 19:21 UTC (permalink / raw)
  To: gregkh; +Cc: devel, Aditya Jain, linux-kernel, hdegoede, joe, Larry.Finger

Fixing ERROR: "foo *	bar" should be "foo *bar" in hal_phy_cfg.h
as reported by checkpatch.pl

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 .../staging/rtl8723bs/include/hal_phy_cfg.h    | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 419ddb0733aa..7e48abc4c760 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -42,7 +42,7 @@ u32 	Data
 
 u32
 PHY_QueryRFReg_8723B(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u8 		eRFPath,
 u32 			RegAddr,
 u32 			BitMask
@@ -50,7 +50,7 @@ u32 			BitMask
 
 void
 PHY_SetRFReg_8723B(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u8 		eRFPath,
 u32 			RegAddr,
 u32 			BitMask,
@@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);
 
 void
 PHY_SetTxPowerIndex(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u32 				PowerIndex,
 u8 			RFPath,
 u8 			Rate
@@ -74,7 +74,7 @@ u8 			Rate
 
 u8
 PHY_GetTxPowerIndex(
-struct adapter *		padapter,
+struct adapter *padapter,
 u8 			RFPath,
 u8 			Rate,
 enum CHANNEL_WIDTH		BandWidth,
@@ -83,19 +83,19 @@ u8 			Channel
 
 void
 PHY_GetTxPowerLevel8723B(
-struct adapter *	Adapter,
-	s32*			powerlevel
+struct adapter *Adapter,
+	s32 *powerlevel
 	);
 
 void
 PHY_SetTxPowerLevel8723B(
-struct adapter *	Adapter,
+struct adapter *Adapter,
 u8 	channel
 	);
 
 void
 PHY_SetBWMode8723B(
-struct adapter *			Adapter,
+struct adapter *Adapter,
 enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
 unsigned char 			Offset		/*  Upper, Lower, or Don't care */
 );
@@ -108,7 +108,7 @@ u8 channel
 
 void
 PHY_SetSwChnlBWMode8723B(
-struct adapter *		Adapter,
+struct adapter *Adapter,
 u8 			channel,
 enum CHANNEL_WIDTH		Bandwidth,
 u8 			Offset40,
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v4 2/3] staging: rtl8723bs: Clean up function declations
  2020-07-29 19:21     ` [PATCH v4 0/3] Fix coding style issues in staging Aditya Jain
  2020-07-29 19:21       ` [PATCH v4 1/3] staging: rtl8723bs: Fix coding style errors Aditya Jain
@ 2020-07-29 19:21       ` Aditya Jain
  2020-07-29 19:21       ` [PATCH v4 3/3] staging: rtl8723bs: Align macro definitions Aditya Jain
  2 siblings, 0 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-29 19:21 UTC (permalink / raw)
  To: gregkh; +Cc: devel, Aditya Jain, linux-kernel, hdegoede, joe, Larry.Finger

Clean up multiline function declartions in hal_phy_cfg.h
to improve code readablility

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 .../staging/rtl8723bs/include/hal_phy_cfg.h   | 110 +++++-------------
 1 file changed, 29 insertions(+), 81 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 7e48abc4c760..0eb3e57f4082 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -25,37 +25,16 @@
 /*------------------------------Define structure End----------------------------*/
 
 /*--------------------------Exported Function prototype---------------------*/
-u32
-PHY_QueryBBReg_8723B(
-struct adapter *Adapter,
-u32 	RegAddr,
-u32 	BitMask
-	);
-
-void
-PHY_SetBBReg_8723B(
-struct adapter *Adapter,
-u32 	RegAddr,
-u32 	BitMask,
-u32 	Data
-	);
-
-u32
-PHY_QueryRFReg_8723B(
-struct adapter *Adapter,
-u8 		eRFPath,
-u32 			RegAddr,
-u32 			BitMask
-	);
-
-void
-PHY_SetRFReg_8723B(
-struct adapter *Adapter,
-u8 		eRFPath,
-u32 			RegAddr,
-u32 			BitMask,
-u32 			Data
-	);
+u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask);
+
+void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr,
+			u32 BitMask, u32 Data);
+
+u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
+			 u32 RegAddr, u32 BitMask);
+
+void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
+			u32 RegAddr, u32 BitMask, u32 Data);
 
 /* MAC/BB/RF HAL config */
 int PHY_BBConfig8723B(struct adapter *Adapter);
@@ -64,56 +43,25 @@ int PHY_RFConfig8723B(struct adapter *Adapter);
 
 s32 PHY_MACConfig8723B(struct adapter *padapter);
 
-void
-PHY_SetTxPowerIndex(
-struct adapter *Adapter,
-u32 				PowerIndex,
-u8 			RFPath,
-u8 			Rate
-	);
-
-u8
-PHY_GetTxPowerIndex(
-struct adapter *padapter,
-u8 			RFPath,
-u8 			Rate,
-enum CHANNEL_WIDTH		BandWidth,
-u8 			Channel
-	);
-
-void
-PHY_GetTxPowerLevel8723B(
-struct adapter *Adapter,
-	s32 *powerlevel
-	);
-
-void
-PHY_SetTxPowerLevel8723B(
-struct adapter *Adapter,
-u8 	channel
-	);
-
-void
-PHY_SetBWMode8723B(
-struct adapter *Adapter,
-enum CHANNEL_WIDTH			Bandwidth,	/*  20M or 40M */
-unsigned char 			Offset		/*  Upper, Lower, or Don't care */
-);
-
-void
-PHY_SwChnl8723B(/*  Call after initialization */
-struct adapter *Adapter,
-u8 channel
-	);
-
-void
-PHY_SetSwChnlBWMode8723B(
-struct adapter *Adapter,
-u8 			channel,
-enum CHANNEL_WIDTH		Bandwidth,
-u8 			Offset40,
-u8 			Offset80
-);
+void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
+			 u8 RFPath, u8 Rate);
+
+u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate,
+			enum CHANNEL_WIDTH BandWidth, u8 Channel);
+
+void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel);
+
+void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel);
+
+void PHY_SetBWMode8723B(struct adapter *Adapter, enum CHANNEL_WIDTH Bandwidth,
+			unsigned char Offset);
+
+/*  Call after initialization */
+void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel);
+
+void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel,
+				enum CHANNEL_WIDTH Bandwidth,
+				u8 Offset40, u8 Offset80);
 
 /*--------------------------Exported Function prototype End---------------------*/
 
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH v4 3/3] staging: rtl8723bs: Align macro definitions
  2020-07-29 19:21     ` [PATCH v4 0/3] Fix coding style issues in staging Aditya Jain
  2020-07-29 19:21       ` [PATCH v4 1/3] staging: rtl8723bs: Fix coding style errors Aditya Jain
  2020-07-29 19:21       ` [PATCH v4 2/3] staging: rtl8723bs: Clean up function declations Aditya Jain
@ 2020-07-29 19:21       ` Aditya Jain
  2 siblings, 0 replies; 20+ messages in thread
From: Aditya Jain @ 2020-07-29 19:21 UTC (permalink / raw)
  To: gregkh; +Cc: devel, Aditya Jain, linux-kernel, hdegoede, joe, Larry.Finger

Adjust spacing in macro definitions to align them and improve
readbility

Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
---
 drivers/staging/rtl8723bs/include/hal_phy_cfg.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
index 0eb3e57f4082..ed3488a09d79 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h
@@ -8,11 +8,11 @@
 #define __INC_HAL8723BPHYCFG_H__
 
 /*--------------------------Define Parameters-------------------------------*/
-#define LOOP_LIMIT				5
-#define MAX_STALL_TIME			50		/* us */
+#define LOOP_LIMIT		5
+#define MAX_STALL_TIME		50	/* us */
 #define AntennaDiversityValue	0x80	/* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */
 #define MAX_TXPWR_IDX_NMODE_92S	63
-#define Reset_Cnt_Limit			3
+#define Reset_Cnt_Limit		3
 
 #define MAX_AGGR_NUM	0x07
 
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, back to index

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26  8:02 [PATCH] staging: rtl8723bs: include: Fix coding style errors Aditya Jain
2020-07-26  8:26 ` Greg KH
2020-07-26  8:40   ` Aditya Jain
2020-07-26 10:53     ` [PATCH v2] staging: rtl8723bs: include: Fix coding style issues Aditya Jain
2020-07-26 10:59       ` Greg KH
2020-07-26 14:18     ` Fix code style issues in staging Aditya Jain
2020-07-26 14:20       ` [PATCH v3 1/4] staging: rtl8723bs: include: Fix coding style errors Aditya Jain
2020-07-26 14:20         ` [PATCH v3 2/4] staging: rtl8723bs: include: Clean up function declations Aditya Jain
2020-07-26 14:20         ` [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations Aditya Jain
2020-07-26 15:02           ` Greg KH
2020-07-26 17:15             ` Joe Perches
2020-07-26 18:15               ` Aditya Jain
2020-07-28 20:03                 ` Aditya Jain
2020-07-26 14:20         ` [PATCH v3 4/4] staging: rtl8723bs: include: Align macro definitions Aditya Jain
2020-07-26 18:03     ` [PATCH] staging: rtl8723bs: include: Fix coding style errors Larry Finger
2020-07-26 18:29       ` Aditya Jain
2020-07-29 19:21     ` [PATCH v4 0/3] Fix coding style issues in staging Aditya Jain
2020-07-29 19:21       ` [PATCH v4 1/3] staging: rtl8723bs: Fix coding style errors Aditya Jain
2020-07-29 19:21       ` [PATCH v4 2/3] staging: rtl8723bs: Clean up function declations Aditya Jain
2020-07-29 19:21       ` [PATCH v4 3/3] staging: rtl8723bs: Align macro definitions Aditya Jain

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git