kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ATM: HE: Cleanup coding style
@ 2014-12-15  1:36 Jonathan Jin
  2014-12-15  1:40 ` Jonathan Jin
  2014-12-15  1:59 ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Jin @ 2014-12-15  1:36 UTC (permalink / raw)
  To: kernelnewbies

This patch cleans up the following coding style issues that are detected by
checkpatch:
        ERROR: trailing whitespace
        ERROR: open brace '{' following struct go on the same line

Signed-off-by: Jonathan Jin <jjin082693@gmail.com>
---
 drivers/atm/he.h | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/atm/he.h b/drivers/atm/he.h
index 110a27d..a9750c6 100644
--- a/drivers/atm/he.h
+++ b/drivers/atm/he.h
@@ -191,9 +191,9 @@ struct he_tpdrq {
 
 struct he_hsp {
 	struct he_hsp_entry {
-		volatile u32 tbrq_tail; 
+		volatile u32 tbrq_tail;
 		volatile u32 reserved1[15];
-		volatile u32 rbrq_tail; 
+		volatile u32 rbrq_tail;
 		volatile u32 reserved2[15];
 	} group[HE_NUM_GROUPS];
 };
@@ -236,13 +236,11 @@ struct he_group {
 
 #define HE_LOOKUP_VCC(dev, cid) ((dev)->he_vcc_table[(cid)].vcc)
 
-struct he_vcc_table 
-{
+struct he_vcc_table {
 	struct atm_vcc *vcc;
 };
 
-struct he_cs_stper
-{
+struct he_cs_stper {
 	long pcr;
 	int inuse;
 };
@@ -316,8 +314,7 @@ struct he_dev {
 
 #define HE_MAXIOV 20
 
-struct he_vcc
-{
+struct he_vcc {
 	struct list_head buffers;
 	int pdu_len;
 	int rc_index;
@@ -457,7 +454,7 @@ struct he_vcc
 #define G0_RBPS_BS	0x8040c
 #define G0_RBPL_S	0x80410
 #define G0_RBPL_T	0x80414
-#define G0_RBPL_QI	0x80418 
+#define G0_RBPL_QI	0x80418
 #define G0_RBPL_BS	0x8041c
 
 #define	G1_RBPS_S	0x80420
@@ -616,11 +613,11 @@ struct he_vcc
 #define  TM_RW_WAIT(x)		(x<<2)
 #define  TM_SRAM_TYPE(x)	(x)
 
-#define TSRB_BA		0x80744	
-#define TSRC_BA		0x80748	
-#define TMABR_BA	0x8074c	
-#define TPD_BA		0x80750	
-#define TSRD_BA		0x80758	
+#define TSRB_BA		0x80744
+#define TSRC_BA		0x80748
+#define TMABR_BA	0x8074c
+#define TPD_BA		0x80750
+#define TSRD_BA		0x80758
 
 #define TX_CONFIG	0x80760
 #define  DRF_THRESH(x)		(x<<22)
-- 
2.1.3

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

* [PATCH] ATM: HE: Cleanup coding style
  2014-12-15  1:36 [PATCH] ATM: HE: Cleanup coding style Jonathan Jin
@ 2014-12-15  1:40 ` Jonathan Jin
  2014-12-15  1:59 ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Jin @ 2014-12-15  1:40 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Dec 14, 2014 at 07:36:23PM -0600, Jonathan Jin wrote:
> This patch cleans up the following coding style issues that are detected by
> checkpatch:
>         ERROR: trailing whitespace
>         ERROR: open brace '{' following struct go on the same line
> 
> Signed-off-by: Jonathan Jin <jjin082693@gmail.com>
> ---
>  drivers/atm/he.h | 25 +++++++++++--------------
>  1 file changed, 11 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/atm/he.h b/drivers/atm/he.h
> index 110a27d..a9750c6 100644
> --- a/drivers/atm/he.h
> +++ b/drivers/atm/he.h
> @@ -191,9 +191,9 @@ struct he_tpdrq {
>  
>  struct he_hsp {
>  	struct he_hsp_entry {
> -		volatile u32 tbrq_tail; 
> +		volatile u32 tbrq_tail;
>  		volatile u32 reserved1[15];
> -		volatile u32 rbrq_tail; 
> +		volatile u32 rbrq_tail;
>  		volatile u32 reserved2[15];
>  	} group[HE_NUM_GROUPS];
>  };
> @@ -236,13 +236,11 @@ struct he_group {
>  
>  #define HE_LOOKUP_VCC(dev, cid) ((dev)->he_vcc_table[(cid)].vcc)
>  
> -struct he_vcc_table 
> -{
> +struct he_vcc_table {
>  	struct atm_vcc *vcc;
>  };
>  
> -struct he_cs_stper
> -{
> +struct he_cs_stper {
>  	long pcr;
>  	int inuse;
>  };
> @@ -316,8 +314,7 @@ struct he_dev {
>  
>  #define HE_MAXIOV 20
>  
> -struct he_vcc
> -{
> +struct he_vcc {
>  	struct list_head buffers;
>  	int pdu_len;
>  	int rc_index;
> @@ -457,7 +454,7 @@ struct he_vcc
>  #define G0_RBPS_BS	0x8040c
>  #define G0_RBPL_S	0x80410
>  #define G0_RBPL_T	0x80414
> -#define G0_RBPL_QI	0x80418 
> +#define G0_RBPL_QI	0x80418
>  #define G0_RBPL_BS	0x8041c
>  
>  #define	G1_RBPS_S	0x80420
> @@ -616,11 +613,11 @@ struct he_vcc
>  #define  TM_RW_WAIT(x)		(x<<2)
>  #define  TM_SRAM_TYPE(x)	(x)
>  
> -#define TSRB_BA		0x80744	
> -#define TSRC_BA		0x80748	
> -#define TMABR_BA	0x8074c	
> -#define TPD_BA		0x80750	
> -#define TSRD_BA		0x80758	
> +#define TSRB_BA		0x80744
> +#define TSRC_BA		0x80748
> +#define TMABR_BA	0x8074c
> +#define TPD_BA		0x80750
> +#define TSRD_BA		0x80758
>  
>  #define TX_CONFIG	0x80760
>  #define  DRF_THRESH(x)		(x<<22)
> -- 
> 2.1.3
> 

Sorry all, I neglected to mention why I'm sending this patch to the
mailing list.

I'd like to get some feedback on the patch before I send it out to Chas
Williams, who scripts/get_maintainer.pl reports as the maintainer of
drivers/atm/he.h. I also plan to CC kernel-janitors at vger.kernel.org in
the patch email.

Thanks in advance for the help and education, everybody.

-- 
Jonathan Jin
University of Chicago '15
(224) 623-9758
jjin.me

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

* [PATCH] ATM: HE: Cleanup coding style
  2014-12-15  1:36 [PATCH] ATM: HE: Cleanup coding style Jonathan Jin
  2014-12-15  1:40 ` Jonathan Jin
@ 2014-12-15  1:59 ` Greg KH
  2014-12-15  4:23   ` karthik nayak
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2014-12-15  1:59 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Dec 14, 2014 at 07:36:23PM -0600, Jonathan Jin wrote:
> This patch cleans up the following coding style issues that are detected by
> checkpatch:
>         ERROR: trailing whitespace
>         ERROR: open brace '{' following struct go on the same line

Don't do multiple things in the same patch, make this at least 2
patches.

greg k-h

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

* [PATCH] ATM: HE: Cleanup coding style
  2014-12-15  1:59 ` Greg KH
@ 2014-12-15  4:23   ` karthik nayak
  2014-12-15  4:34     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: karthik nayak @ 2014-12-15  4:23 UTC (permalink / raw)
  To: kernelnewbies

 On Mon, Dec 15, 2014, 7:31 AM Greg KH <greg@kroah.com> wrote:

On Sun, Dec 14, 2014 at 07:36:23PM -0600, Jonathan Jin wrote:
> This patch cleans up the following coding style issues that are detected
by
> checkpatch:
>         ERROR: trailing whitespace
>         ERROR: open brace '{' following struct go on the same line

Don't do multiple things in the same patch, make this at least 2
patches.

greg k-h

 (Sorry, replied on my phone, default was not set to reply all.)

Wouldn't this count as one checkpatch fix patch? I mean, being the same
file.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141215/970f4ff2/attachment.html 

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

* [PATCH] ATM: HE: Cleanup coding style
  2014-12-15  4:23   ` karthik nayak
@ 2014-12-15  4:34     ` Greg KH
  2014-12-15  5:17       ` karthik nayak
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2014-12-15  4:34 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Dec 15, 2014 at 04:23:18AM +0000, karthik nayak wrote:
> 
> On Mon, Dec 15, 2014, 7:31 AM?Greg KH <greg@kroah.com> wrote:
> 
>     On Sun, Dec 14, 2014 at 07:36:23PM -0600, Jonathan Jin wrote:
>     > This patch cleans up the following coding style issues that are detected
>     by
>     > checkpatch:
>     >? ? ? ? ?ERROR: trailing whitespace
>     >? ? ? ? ?ERROR: open brace '{' following struct go on the same line
> 
>     Don't do multiple things in the same patch, make this at least 2
>     patches.
> 
>     greg k-h
> 
> (Sorry, replied on my phone, default was not set to reply all.)
> 
> Wouldn't this count as one checkpatch fix patch? I mean, being the same file.

Nope, you are doing two different _types_ of checkpatch fixes.  So it
needs to be more than one patch.

Remember, you need to make it as easy as possible for a maintainer to
read your patch, doing more than one thing in a patch makes it much
harder, and it gives them an easy reason to reject to it.

greg k-h

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

* [PATCH] ATM: HE: Cleanup coding style
  2014-12-15  4:34     ` Greg KH
@ 2014-12-15  5:17       ` karthik nayak
  0 siblings, 0 replies; 6+ messages in thread
From: karthik nayak @ 2014-12-15  5:17 UTC (permalink / raw)
  To: kernelnewbies

 On Mon, Dec 15, 2014, 10:04 AM Greg KH <greg@kroah.com> wrote:

On Mon, Dec 15, 2014 at 04:23:18AM +0000, karthik nayak wrote:
>
> On Mon, Dec 15, 2014, 7:31 AM Greg KH <greg@kroah.com> wrote:
>
>     On Sun, Dec 14, 2014 at 07:36:23PM -0600, Jonathan Jin wrote:
>     > This patch cleans up the following coding style issues that are
detected
>     by
>     > checkpatch:
>     >         ERROR: trailing whitespace
>     >         ERROR: open brace '{' following struct go on the same line
>
>     Don't do multiple things in the same patch, make this at least 2
>     patches.
>
>     greg k-h
>
> (Sorry, replied on my phone, default was not set to reply all.)
>
> Wouldn't this count as one checkpatch fix patch? I mean, being the same
file.

Nope, you are doing two different _types_ of checkpatch fixes.  So it
needs to be more than one patch.

Remember, you need to make it as easy as possible for a maintainer to
read your patch, doing more than one thing in a patch makes it much
harder, and it gives them an easy reason to reject to it.

greg k-h

Thank you for that
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141215/a50ae3ec/attachment-0001.html 

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

end of thread, other threads:[~2014-12-15  5:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15  1:36 [PATCH] ATM: HE: Cleanup coding style Jonathan Jin
2014-12-15  1:40 ` Jonathan Jin
2014-12-15  1:59 ` Greg KH
2014-12-15  4:23   ` karthik nayak
2014-12-15  4:34     ` Greg KH
2014-12-15  5:17       ` karthik nayak

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).