Skip to contentSkip to conversation

net: intel: Cleanup e1000 - add space between }}

PATCH In review Forrest Fleming 3 participants 9 messages Aug 23, 2019 – Aug 27, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: intel: Cleanup e1000 - add space between }}

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/net/ethernet/intel/e1000/e1000_param.c +14 -14
index d3f29ffe1e47..1a1f2f0237f9 100644
@@ -266,7 +266,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 			.arg  = { .r = {
 				.min = E1000_MIN_TXD,
 				.max = mac_type < e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD
-				}}
+				} }
 		};
 
 		if (num_TxDescriptors > bd) {
@@ -295,7 +295,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 				.min = E1000_MIN_RXD,
 				.max = mac_type < e1000_82544 ? E1000_MAX_RXD :
 				       E1000_MAX_82544_RXD
-			}}
+			} }
 		};
 
 		if (num_RxDescriptors > bd) {
@@ -341,7 +341,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 			.err  = "reading default settings from EEPROM",
 			.def  = E1000_FC_DEFAULT,
 			.arg  = { .l = { .nr = ARRAY_SIZE(fc_list),
-					 .p = fc_list }}
+					 .p = fc_list } }
 		};
 
 		if (num_FlowControl > bd) {
@@ -359,7 +359,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 			.err  = "using default of " __MODULE_STRING(DEFAULT_TIDV),
 			.def  = DEFAULT_TIDV,
 			.arg  = { .r = { .min = MIN_TXDELAY,
-					 .max = MAX_TXDELAY }}
+					 .max = MAX_TXDELAY } }
 		};
 
 		if (num_TxIntDelay > bd) {
@@ -377,7 +377,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 			.err  = "using default of " __MODULE_STRING(DEFAULT_TADV),
 			.def  = DEFAULT_TADV,
 			.arg  = { .r = { .min = MIN_TXABSDELAY,
-					 .max = MAX_TXABSDELAY }}
+					 .max = MAX_TXABSDELAY } }
 		};
 
 		if (num_TxAbsIntDelay > bd) {
@@ -395,7 +395,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 			.err  = "using default of " __MODULE_STRING(DEFAULT_RDTR),
 			.def  = DEFAULT_RDTR,
 			.arg  = { .r = { .min = MIN_RXDELAY,
-					 .max = MAX_RXDELAY }}
+					 .max = MAX_RXDELAY } }
 		};
 
 		if (num_RxIntDelay > bd) {
@@ -413,7 +413,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 			.err  = "using default of " __MODULE_STRING(DEFAULT_RADV),
 			.def  = DEFAULT_RADV,
 			.arg  = { .r = { .min = MIN_RXABSDELAY,
-					 .max = MAX_RXABSDELAY }}
+					 .max = MAX_RXABSDELAY } }
 		};
 
 		if (num_RxAbsIntDelay > bd) {
@@ -431,7 +431,7 @@ void e1000_check_options(struct e1000_adapter *adapter)
 			.err  = "using default of " __MODULE_STRING(DEFAULT_ITR),
 			.def  = DEFAULT_ITR,
 			.arg  = { .r = { .min = MIN_ITR,
-					 .max = MAX_ITR }}
+					 .max = MAX_ITR } }
 		};
 
 		if (num_InterruptThrottleRate > bd) {
@@ -545,7 +545,7 @@ static void e1000_check_copper_options(struct e1000_adapter *adapter)
 			{          0, "" },
 			{   SPEED_10, "" },
 			{  SPEED_100, "" },
-			{ SPEED_1000, "" }};
+			{ SPEED_1000, "" } };
 
 		opt = (struct e1000_option) {
 			.type = list_option,
@@ -553,7 +553,7 @@ static void e1000_check_copper_options(struct e1000_adapter *adapter)
 			.err  = "parameter ignored",
 			.def  = 0,
 			.arg  = { .l = { .nr = ARRAY_SIZE(speed_list),
-					 .p = speed_list }}
+					 .p = speed_list } }
 		};
 
 		if (num_Speed > bd) {
@@ -567,7 +567,7 @@ static void e1000_check_copper_options(struct e1000_adapter *adapter)
 		static const struct e1000_opt_list dplx_list[] = {
 			{           0, "" },
 			{ HALF_DUPLEX, "" },
-			{ FULL_DUPLEX, "" }};
+			{ FULL_DUPLEX, "" } };
 
 		opt = (struct e1000_option) {
 			.type = list_option,
@@ -575,7 +575,7 @@ static void e1000_check_copper_options(struct e1000_adapter *adapter)
 			.err  = "parameter ignored",
 			.def  = 0,
 			.arg  = { .l = { .nr = ARRAY_SIZE(dplx_list),
-					 .p = dplx_list }}
+					 .p = dplx_list } }
 		};
 
 		if (num_Duplex > bd) {
@@ -623,7 +623,7 @@ static void e1000_check_copper_options(struct e1000_adapter *adapter)
 			 { 0x2c, AA "1000/FD, 100/FD, 100/HD" },
 			 { 0x2d, AA "1000/FD, 100/FD, 100/HD, 10/HD" },
 			 { 0x2e, AA "1000/FD, 100/FD, 100/HD, 10/FD" },
-			 { 0x2f, AA "1000/FD, 100/FD, 100/HD, 10/FD, 10/HD" }};
+			 { 0x2f, AA "1000/FD, 100/FD, 100/HD, 10/FD, 10/HD" } };
 
 		opt = (struct e1000_option) {
 			.type = list_option,
@@ -631,7 +631,7 @@ static void e1000_check_copper_options(struct e1000_adapter *adapter)
 			.err  = "parameter ignored",
 			.def  = AUTONEG_ADV_DEFAULT,
 			.arg  = { .l = { .nr = ARRAY_SIZE(an_list),
-					 .p = an_list }}
+					 .p = an_list } }
 		};
 
 		if (num_AutoNeg > bd) {
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · Forrest Fleming

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

While I do not see an issue with this change, I wonder how important it is to make such a change. Especially since most of the hardware supported by this driver is not available for testing. In addition, this is one suggested change by checkpatch.pl that I personally do not agree with.

This is not a hard NAK, but you have to explain how this change makes the
code more readable before I consider it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20190826/db4fc78d/attachment.asc>

maintainer
#2 lore raw
Quoted 8 lines · Jeff Kirsher
Quoted 6 lines · Forrest Fleming

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 4 lines

While I do not see an issue with this change, I wonder how important it is to make such a change. Especially since most of the hardware supported by this driver is not available for testing. In addition, this is one suggested change by checkpatch.pl that I personally do not agree with.

I think checkpatch should allow consecutive }}.

Maybe:
---

scripts/checkpatch.pl +1 -1
index 287fe73688f0..ac5e0f06e1af 100755
@@ -4687,7 +4687,7 @@ sub process {
 
 # closing brace should have a space following it when it has anything
 # on the line
-		if ($line =~ /}(?!(?:,|;|\)))\S/) {
+		if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
 			if (ERROR("SPACING",
 				  "space required after that close brace '}'\n" . $herecurr) &&
 			    $fix) {
#3 lore raw
Quoted 18 lines · Joe Perches
Quoted 9 lines · Jeff Kirsher
Quoted 7 lines · Forrest Fleming

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28 +++++++++--
--------
 1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 7 lines

While I do not see an issue with this change, I wonder how important it is
to make such a change. Especially since most of the hardware supported by
this driver is not available for testing. In addition, this is one suggested change by checkpatch.pl that I personally do not agree with.

Quoted 1 line

I think checkpatch should allow consecutive }}.

Agreed, have you already submitted a formal patch Joe with the suggested change below? If so, I will ACK it.

Quoted 16 lines

Maybe:
---

scripts/checkpatch.pl +0 -0
index 287fe73688f0..ac5e0f06e1af 100755
@@ -4687,7 +4687,7 @@ sub process {
 
 # closing brace should have a space following it when it has

anything

 # on the line
scripts/checkpatch.pl +1 -1
-		if ($line =~ /}(?!(?:,|;|\)))\S/) {
+		if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
 			if (ERROR("SPACING",
 				  "space required after that close
Quoted 4 lines

brace '}'\n" . $herecurr) &&
$fix) {

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20190827/cf798b22/attachment.asc>

maintainer
#4 lore raw
Quoted 19 lines · Jeff Kirsher
Quoted 18 lines · Joe Perches
Quoted 16 lines · Jeff Kirsher
Quoted 7 lines · Forrest Fleming

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28 +++++++++--
--------
 1 file changed, 14 insertions(+), 14 deletions(-)

While I do not see an issue with this change, I wonder how important it is
to make such a change. Especially since most of the hardware supported by
this driver is not available for testing. In addition, this is one suggested change by checkpatch.pl that I personally do not agree with.

Quoted 4 lines
Quoted 1 line

I think checkpatch should allow consecutive }}.

Agreed, have you already submitted a formal patch Joe with the suggested change below?

No.

Quoted 1 line

If so, I will ACK it.

Of course you can add an Acked-by:

Quoted 19 lines
Quoted 19 lines

Maybe:
---

scripts/checkpatch.pl +0 -0
index 287fe73688f0..ac5e0f06e1af 100755
@@ -4687,7 +4687,7 @@ sub process {
 
 # closing brace should have a space following it when it has

anything

 # on the line
scripts/checkpatch.pl +1 -1
-		if ($line =~ /}(?!(?:,|;|\)))\S/) {
+		if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
 			if (ERROR("SPACING",
 				  "space required after that close

brace '}'\n" . $herecurr) &&
$fix) {

#5 lore raw
Quoted 23 lines · Joe Perches
Quoted 21 lines · Jeff Kirsher
Quoted 19 lines · Joe Perches
Quoted 9 lines · Jeff Kirsher
Quoted 7 lines · Forrest Fleming

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28 +++++++++--
--------
 1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 7 lines

While I do not see an issue with this change, I wonder how important it is
to make such a change. Especially since most of the hardware supported by
this driver is not available for testing. In addition, this is one suggested change by checkpatch.pl that I personally do not agree with.

I think checkpatch should allow consecutive }}.

Quoted 9 lines
Quoted 2 lines

Agreed, have you already submitted a formal patch Joe with the suggested change below?

No.

Quoted 1 line

If so, I will ACK it.

Of course you can add an Acked-by:

Totally fair - I don't have strong feelings regarding the particular rule. I do feel strongly that we should avoid violating our rules as encoded by checkpatch, but I'm perfectly happy for the change to take the form of modifying checkpatch to allow a perfectly sensible (and readable) construct.

I'm happy to withdraw this patch from consideration; I couldn't find anything about there being a formal procedure for so doing, so please let me know if there's anything more I need to do (or point me to the relevant docs).

Thanks to everyone!

#6 lore raw
Quoted 44 lines · Forrest Fleming
Quoted 25 lines · Joe Perches
Quoted 24 lines · Jeff Kirsher
Quoted 22 lines · Joe Perches
Quoted 10 lines · Jeff Kirsher
Quoted 8 lines · Forrest Fleming

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28
+++++++++--
--------
 1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 9 lines

While I do not see an issue with this change, I wonder how important it is
to make such a change. Especially since most of the hardware supported by
this driver is not available for testing. In addition, this is one
suggested change by checkpatch.pl that I personally do not agree
with.

I think checkpatch should allow consecutive }}.

Quoted 9 lines
Quoted 2 lines

Agreed, have you already submitted a formal patch Joe with the suggested change below?

No.

Quoted 1 line

If so, I will ACK it.

Of course you can add an Acked-by:

Totally fair - I don't have strong feelings regarding the particular rule. I do
feel strongly that we should avoid violating our rules as encoded by checkpatch,
but I'm perfectly happy for the change to take the form of modifying checkpatch
to allow a perfectly sensible (and readable) construct.

Quoted 8 lines

I'm happy to withdraw this patch from consideration; I couldn't find anything
about there being a formal procedure for so doing, so please let me know if
there's anything more I need to do (or point me to the relevant docs).

Thanks to everyone!

Nothing for you to do, I will drop the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20190827/afb18505/attachment-0001.asc>

Acked-by
#7 lore raw
In reply to Joe Perches
Quoted 18 lines · Joe Perches
Quoted 9 lines · Jeff Kirsher
Quoted 7 lines · Forrest Fleming

suggested by checkpatch

---
 .../net/ethernet/intel/e1000/e1000_param.c    | 28 +++++++++--
--------
 1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 7 lines

While I do not see an issue with this change, I wonder how important it is
to make such a change. Especially since most of the hardware supported by
this driver is not available for testing. In addition, this is one suggested change by checkpatch.pl that I personally do not agree with.

Quoted 1 line

I think checkpatch should allow consecutive }}.

Quoted 16 lines

Maybe:
---

scripts/checkpatch.pl +0 -0
index 287fe73688f0..ac5e0f06e1af 100755
@@ -4687,7 +4687,7 @@ sub process {
 
 # closing brace should have a space following it when it has

anything

 # on the line
scripts/checkpatch.pl +1 -1
-		if ($line =~ /}(?!(?:,|;|\)))\S/) {
+		if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
 			if (ERROR("SPACING",
 				  "space required after that close
Quoted 4 lines

brace '}'\n" . $herecurr) &&
$fix) {

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20190827/1590128e/attachment.asc>

maintainer
#8 lore raw

PATCH 1/1 checkpatch: Allow consecutive close braces

In reply to Jeff Kirsher

checkpatch allows consecutive open braces, so it
should also allow consecutive close braces.

---

scripts/checkpatch.pl +1 -1
index 287fe73688f0..ac5e0f06e1af 100755
@@ -4687,7 +4687,7 @@ sub process {
 
 # closing brace should have a space following it when it has anything
 # on the line
-		if ($line =~ /}(?!(?:,|;|\)))\S/) {
+		if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
 			if (ERROR("SPACING",
 				  "space required after that close brace '}'\n" . $herecurr) &&
 			    $fix) {