Skip to contentSkip to conversation

staging: wlan-ng: align else if statement to coding standard

PATCH Superseded Maksymilian Piechota 2 participants 7 messages Feb 13, 2017 – Feb 15, 2017 Staging

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v6 cover staging: wlan-ng: align else if statement to coding standard

PATCHv0:

- Spaces replaced with tabs

Maksymilian Piechota (1):
staging: wlan-ng: This patch fixes the checkpatch.pl warning:

else if statement still did not fulfill coding standard requirements.

PATCHv2:

- else if statement moved to single line

Maksymilian Piechota (1):
staging: wlan-ng: This patch fixes the checkpatch.pl warning:

Subject was not precise.

PATCHv3:

- Subject is more precise
- Changelog text describe every change

Maksymilian Piechota (1):
staging: lustre: align else if statement to coding standard

Too much changes for one patch.

PATCHv4:

- Previous patch breaked up to particular patches for every change

Maksymilian Piechota (2):
staging: lustre: move logical continuations at the end of line
staging: lustre: move else if statement to a single line

Continuation of the statement should be realigned

PATCHv5:

- Wrong prefixes in commits and patches titles changed
- Else if continuation realigned

Maksymilian Piechota (3):
staging: wlan-ng: move logical continuations at the end of line
staging: wlan-ng: move else if statement to a single line
staging: wlan-ng: realign else if continuation

Lack of patches history. No changelog text for particular patches

PATCHv6:

- changelog text for patches added
- patches history added

Maksymilian Piechota (3):
staging: wlan-ng: move logical continuations at the end of line
staging: wlan-ng: move else if statement to a single line
staging: wlan-ng: realign else if continuation

drivers/staging/wlan-ng/prism2mgmt.c | 6 ++----

 1 file changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH v6 1/3 staging: wlan-ng: move logical continuations at the end of line

move logical continuations at the end of line

---
 drivers/staging/wlan-ng/prism2mgmt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2mgmt.c +2 -3
index 16fb2d3..64a9ebc 100644
@@ -1308,9 +1308,8 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp)
 			hw->sniffhdr = 0;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else
-		    if ((msg->wlanheader.status ==
-			 P80211ENUM_msgitem_status_data_ok)
-			&& (msg->wlanheader.data == P80211ENUM_truth_true)) {
+		    if ((msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok) && 
+			(msg->wlanheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 1;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else {
Signature · 1 line
2.1.4
#2 lore raw

Re: [PATCHv6 1/3] staging: wlan-ng: move logical continuations at the end of line

Quoted 13 lines · Maksymilian Piechota

move logical continuations at the end of line

---
 drivers/staging/wlan-ng/prism2mgmt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2mgmt.c +0 -0
index 16fb2d3..64a9ebc 100644
@@ -1308,9 +1308,8 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp)
 			hw->sniffhdr = 0;

drivers/staging/wlan-ng/prism2mgmt.c int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp) · line 1315

Quoted 10 lines
drivers/staging/wlan-ng/prism2mgmt.c +2 -3
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else
-		    if ((msg->wlanheader.status ==
-			 P80211ENUM_msgitem_status_data_ok)
-			&& (msg->wlanheader.data == P80211ENUM_truth_true)) {
+		    if ((msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok) && 
+			(msg->wlanheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 1;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else {

This patch has checkpatch.pl errors. Please always use checkpatch so you don't get emails from grumpy maintainers telling you to fix the checkpatch errors :)

Please fix up and resend the whole series.

thanks,

greg k-h

#3 lore raw

Re: [PATCHv6 1/3] staging: wlan-ng: move logical continuations at the end of line

Quoted 29 lines · Greg Kroah-Hartman
Quoted 13 lines · Maksymilian Piechota

move logical continuations at the end of line

---
 drivers/staging/wlan-ng/prism2mgmt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2mgmt.c +0 -0
index 16fb2d3..64a9ebc 100644
@@ -1308,9 +1308,8 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp)
 			hw->sniffhdr = 0;

drivers/staging/wlan-ng/prism2mgmt.c int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp) · line 1315

Quoted 10 lines
drivers/staging/wlan-ng/prism2mgmt.c +2 -3
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else
-		    if ((msg->wlanheader.status ==
-			 P80211ENUM_msgitem_status_data_ok)
-			&& (msg->wlanheader.data == P80211ENUM_truth_true)) {
+		    if ((msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok) && 
+			(msg->wlanheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 1;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else {

This patch has checkpatch.pl errors. Please always use checkpatch so you don't get emails from grumpy maintainers telling you to fix the checkpatch errors :)

Quoted 5 lines

Please fix up and resend the whole series.

thanks,

greg k-h

of course it has. Few patches ago I've sent all changes in one patch so there was no errors. Then You asked me to break up every change to particular commits, so there are checkpatch errors between them. PATCH 3/3 solves all errors.

So how should I commit this changes, finally? I feel bit lost.

#4 lore raw

Re: [PATCHv6 1/3] staging: wlan-ng: move logical continuations at the end of line

Quoted 32 lines · Maksymilian Piechota
Quoted 31 lines · Greg Kroah-Hartman
Quoted 13 lines · Maksymilian Piechota

move logical continuations at the end of line

---
 drivers/staging/wlan-ng/prism2mgmt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2mgmt.c +0 -0
index 16fb2d3..64a9ebc 100644
@@ -1308,9 +1308,8 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp)
 			hw->sniffhdr = 0;

drivers/staging/wlan-ng/prism2mgmt.c int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp) · line 1315

Quoted 10 lines
drivers/staging/wlan-ng/prism2mgmt.c +2 -3
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else
-		    if ((msg->wlanheader.status ==
-			 P80211ENUM_msgitem_status_data_ok)
-			&& (msg->wlanheader.data == P80211ENUM_truth_true)) {
+		    if ((msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok) && 
+			(msg->wlanheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 1;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else {

This patch has checkpatch.pl errors. Please always use checkpatch so you don't get emails from grumpy maintainers telling you to fix the checkpatch errors :)

Please fix up and resend the whole series.

Quoted 8 lines
Quoted 3 lines

thanks,

greg k-h

of course it has. Few patches ago I've sent all changes in one patch so there was no errors. Then You asked me to break up every change to particular commits, so there are checkpatch errors between them. PATCH 3/3 solves all errors.

But you added NEW errors in this patch, which isn't ok at all. Don't make a new error and then remove it in a later one, that's just crazy!

(hint, trailing whitespace...)

Also, you made this change in a way that added another new problem (too long of a line), you don't have to do that in order to fix this one warning.

Please fix up and resend.

thanks,

greg k-h

#5 lore raw

PATCH v6 2/3 staging: wlan-ng: move else if statement to a single line

In reply to Maksymilian Piechota

move else if statement to a single line

---
 drivers/staging/wlan-ng/prism2mgmt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wlan-ng/prism2mgmt.c +1 -2
index 64a9ebc..af83f2a 100644
@@ -1307,8 +1307,7 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp)
 		    && (msg->prismheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 0;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
-		} else
-		    if ((msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok) && 
+		} else if ((msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok) &&
 			(msg->wlanheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 1;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
Signature · 1 line
2.1.4
#6 lore raw

PATCH v6 3/3 staging: wlan-ng: realign else if continuation

In reply to Maksymilian Piechota

realign else if continuation

---
 drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/prism2mgmt.c +1 -1
index af83f2a..5277f36 100644
@@ -1308,7 +1308,7 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp)
 			hw->sniffhdr = 0;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else if ((msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok) &&
-			(msg->wlanheader.data == P80211ENUM_truth_true)) {
+			   (msg->wlanheader.data == P80211ENUM_truth_true)) {
 			hw->sniffhdr = 1;
 			wlandev->netdev->type = ARPHRD_IEEE80211_PRISM;
 		} else {
Signature · 1 line
2.1.4