Skip to contentSkip to conversation

ATM: HE: Cleanup coding style

PATCH Superseded Jonathan Jin 2 participants 6 messages Dec 16, 2014 ATM

lore
Share & tools
lore
#0 lore raw

v2 cover ATM: HE: Cleanup coding style

At Greg KH's advice, I've revised my previous formatting patch by splicing it into two separate patches in the same sequence. If I could get additional feedback, I'd very much appreciate it.

This patch sequence 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

Jonathan Jin (2):
ATM: HE: Cleanup coding style (whitespace)
ATM: HE: Cleanup coding style (struct braces)

 drivers/atm/he.h | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)
Signature · 1 line
2.1.3
#1 lore raw

PATCH v2 1/2 ATM: HE: Cleanup coding style (whitespace)

Address checkpatch.pl complaints regarding trailing whitespace

---
 drivers/atm/he.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/atm/he.h +8 -8
index 110a27d..160a315 100644
@@ -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];
 };
@@ -457,7 +457,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 +616,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)
Signature · 1 line
2.1.3
#2 lore raw

PATCH v2 2/2 ATM: HE: Cleanup coding style (struct braces)

In reply to Jonathan Jin

Address checkpatch.pl complaints regarding proper struct brace placement

---
 drivers/atm/he.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/atm/he.h +3 -6
index 160a315..a9750c6 100644
@@ -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;
Signature · 1 line
2.1.3
#3 lore raw

PATCH v2 2/2 ATM: HE: Cleanup coding style (struct braces)

Quoted 1 line · Jonathan Jin

Address checkpatch.pl complaints regarding proper struct brace placement

Minor nit, why the extra spaces at the front of the line?

And properly wrap your lines at 72 columns, like git should have told you to in the editor.

thanks,

greg k-h

#4 lore raw

v2 cover ATM: HE: Cleanup coding style

In reply to Jonathan Jin
Quoted 9 lines · Jonathan Jin

At Greg KH's advice, I've revised my previous formatting patch by splicing it into two separate patches in the same sequence. If I could get additional feedback, I'd very much appreciate it.

This patch sequence 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

Quoted 6 lines

Jonathan Jin (2):
ATM: HE: Cleanup coding style (whitespace)
ATM: HE: Cleanup coding style (struct braces)

 drivers/atm/he.h | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

Looks good, just the one nit about the leading spaces in the changelog entry.

But note, some maintainers don't care about patches like this, so if they are ignored, be prepared. If they don't get picked up in a month or so, try a subsystem that wants these types of patches, like the staging tree.

thanks,

greg k-h

#5 lore raw

v2 cover ATM: HE: Cleanup coding style

Quoted 4 lines · Greg KH

But note, some maintainers don't care about patches like this, so if they are ignored, be prepared. If they don't get picked up in a month or so, try a subsystem that wants these types of patches, like the staging tree.

Thanks for the patience and advice, Greg. You're really doing a huge ton to help an aspiring kernel dev out, and I really appreciate it.

I figured that I'd at least get a patch out onto this list and get it torn apart first before then moving on to making an "actual" patch to the staging tree.

I'll be looking into that soon; stay tuned.

And thanks again.

Signature · 2 lines
Jonathan Jin
jjin.me