linux-next: manual merge of the net tree with Linus' tree

4 messages, 3 authors, 2011-09-19 · open the first message on its own page

linux-next: manual merge of the net tree with Linus' tree

From: Stephen Rothwell <hidden>
Date: 2011-09-19 04:51:08

Hi all,

Today's linux-next merge of the net tree got a conflict in
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c between commit
c482e6c06461 ("bnx2x: Fix ETS bandwidth") from Linus' tree and commit
94f05b0f60de ("bnx2x: Coalesce pr_cont uses and fix DP typos") from the
net tree.

The former removes the code cleaned up by the latter, so I used the
former (see below).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index ba15bdc,8e9b87b..0000000
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@@ -852,20 -852,26 +852,20 @@@ static int bnx2x_ets_e3b0_get_total_bw
  	/* Calculate total BW requested */
  	for (cos_idx = 0; cos_idx < ets_params->num_of_cos; cos_idx++) {
  		if (bnx2x_cos_state_bw == ets_params->cos[cos_idx].state) {
 -
 -			if (0 == ets_params->cos[cos_idx].params.bw_params.bw) {
 -				DP(NETIF_MSG_LINK,
 -				   "bnx2x_ets_E3B0_config BW was set to 0\n");
 -			return -EINVAL;
 +			*total_bw +=
 +				ets_params->cos[cos_idx].params.bw_params.bw;
  		}
 -		*total_bw +=
 -		    ets_params->cos[cos_idx].params.bw_params.bw;
 -	    }
  	}
  
 -	/*Check taotl BW is valid */
 +	/* Check total BW is valid */
  	if ((100 != *total_bw) || (0 == *total_bw)) {
  		if (0 == *total_bw) {
- 			DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config toatl BW"
- 					   "shouldn't be 0\n");
+ 			DP(NETIF_MSG_LINK,
+ 			   "bnx2x_ets_E3B0_config toatl BW shouldn't be 0\n");
  			return -EINVAL;
  		}
- 		DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config toatl BW should be"
- 				   "100\n");
+ 		DP(NETIF_MSG_LINK,
+ 		   "bnx2x_ets_E3B0_config toatl BW should be 100\n");
  		/**
  		*   We can handle a case whre the BW isn't 100 this can happen
  		*   if the TC are joined.

Re: linux-next: manual merge of the net tree with Linus' tree

From: Dmitry Kravkov <hidden>
Date: 2011-09-19 06:55:23

On Sun, 2011-09-18 at 21:51 -0700, Stephen Rothwell wrote:
Hi all,

Today's linux-next merge of the net tree got a conflict in
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c between commit
c482e6c06461 ("bnx2x: Fix ETS bandwidth") from Linus' tree and commit
94f05b0f60de ("bnx2x: Coalesce pr_cont uses and fix DP typos") from the
net tree.

The former removes the code cleaned up by the latter, so I used the
former (see below).
Can you use this one instead?
Contains spell fixes and some formatting.

Signed-off-by: Dmitry Kravkov <redacted>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c |   34 ++++++++-------------
 1 files changed, 13 insertions(+), 21 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 8e9b87b..733ace0 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -850,32 +850,24 @@ static int bnx2x_ets_e3b0_get_total_bw(
 
 	*total_bw = 0 ;
 	/* Calculate total BW requested */
-	for (cos_idx = 0; cos_idx < ets_params->num_of_cos; cos_idx++) {
-		if (bnx2x_cos_state_bw == ets_params->cos[cos_idx].state) {
+	for (cos_idx = 0; cos_idx < ets_params->num_of_cos; cos_idx++)
+		if (bnx2x_cos_state_bw == ets_params->cos[cos_idx].state)
+			*total_bw +=
+				ets_params->cos[cos_idx].params.bw_params.bw;
 
-			if (0 == ets_params->cos[cos_idx].params.bw_params.bw) {
-				DP(NETIF_MSG_LINK,
-				   "bnx2x_ets_E3B0_config BW was set to 0\n");
-			return -EINVAL;
-		}
-		*total_bw +=
-		    ets_params->cos[cos_idx].params.bw_params.bw;
-	    }
-	}
-
-	/*Check taotl BW is valid */
+	/* Check total BW is valid */
 	if ((100 != *total_bw) || (0 == *total_bw)) {
 		if (0 == *total_bw) {
-			DP(NETIF_MSG_LINK,
-			   "bnx2x_ets_E3B0_config toatl BW shouldn't be 0\n");
+			DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config total BW"
+					   "shouldn't be 0\n");
 			return -EINVAL;
 		}
-		DP(NETIF_MSG_LINK,
-		   "bnx2x_ets_E3B0_config toatl BW should be 100\n");
-		/**
-		*   We can handle a case whre the BW isn't 100 this can happen
-		*   if the TC are joined.
-		*/
+		DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config total BW should be"
+				   "100\n");
+		/*
+		 * We can handle a case where the BW isn't 100 this can happen
+		 * if the TC are joined.
+		 */
 	}
 	return 0;
 }
-- 
1.7.2.2

Re: linux-next: manual merge of the net tree with Linus' tree

From: Joe Perches <joe@perches.com>
Date: 2011-09-19 15:54:44

On Mon, 2011-09-19 at 09:55 +0300, Dmitry Kravkov wrote:
On Sun, 2011-09-18 at 21:51 -0700, Stephen Rothwell wrote:
quoted
Today's linux-next merge of the net tree got a conflict in
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c between commit
c482e6c06461 ("bnx2x: Fix ETS bandwidth") from Linus' tree and commit
94f05b0f60de ("bnx2x: Coalesce pr_cont uses and fix DP typos") from the
net tree.
[]
Can you use this one instead?
Contains spell fixes and some formatting.
Hey Dmitry.

The toatl/total spelling fix is good,
but I think this isn't better and is
in fact worse.
quoted hunk
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 8e9b87b..733ace0 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -850,32 +850,24 @@ static int bnx2x_ets_e3b0_get_total_bw(
[]
quoted hunk
-			DP(NETIF_MSG_LINK,
-			   "bnx2x_ets_E3B0_config toatl BW shouldn't be 0\n");
+			DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config total BW"
+					   "shouldn't be 0\n");
Multiple line format strings lines are bad style and error prone.
You introduce broken spacing after string coalescing.
quoted hunk
-		DP(NETIF_MSG_LINK,
-		   "bnx2x_ets_E3B0_config toatl BW should be 100\n");
-		/**
-		*   We can handle a case whre the BW isn't 100 this can happen
-		*   if the TC are joined.
-		*/
+		DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config total BW should be"
+				   "100\n");
Here too.

Re: linux-next: manual merge of the net tree with Linus' tree

From: Dmitry Kravkov <hidden>
Date: 2011-09-19 16:04:46

On Mon, 2011-09-19 at 08:54 -0700, Joe Perches wrote:
On Mon, 2011-09-19 at 09:55 +0300, Dmitry Kravkov wrote:
quoted
On Sun, 2011-09-18 at 21:51 -0700, Stephen Rothwell wrote:
quoted
Today's linux-next merge of the net tree got a conflict in
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c between commit
c482e6c06461 ("bnx2x: Fix ETS bandwidth") from Linus' tree and commit
94f05b0f60de ("bnx2x: Coalesce pr_cont uses and fix DP typos") from the
net tree.
[]
quoted
Can you use this one instead?
Contains spell fixes and some formatting.
Multiple line format strings lines are bad style and error prone.
You introduce broken spacing after string coalescing.
Contains spell fixes and some formatting

v2: fix broken spacing

Signed-off-by: Dmitry Kravkov <redacted>
---
Joe, Thanks for noticing that
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c |   30 ++++++++--------------
 1 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 8e9b87b..5a9444a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -850,32 +850,24 @@ static int bnx2x_ets_e3b0_get_total_bw(
 
 	*total_bw = 0 ;
 	/* Calculate total BW requested */
-	for (cos_idx = 0; cos_idx < ets_params->num_of_cos; cos_idx++) {
-		if (bnx2x_cos_state_bw == ets_params->cos[cos_idx].state) {
+	for (cos_idx = 0; cos_idx < ets_params->num_of_cos; cos_idx++)
+		if (bnx2x_cos_state_bw == ets_params->cos[cos_idx].state)
+			*total_bw +=
+				ets_params->cos[cos_idx].params.bw_params.bw;
 
-			if (0 == ets_params->cos[cos_idx].params.bw_params.bw) {
-				DP(NETIF_MSG_LINK,
-				   "bnx2x_ets_E3B0_config BW was set to 0\n");
-			return -EINVAL;
-		}
-		*total_bw +=
-		    ets_params->cos[cos_idx].params.bw_params.bw;
-	    }
-	}
-
-	/*Check taotl BW is valid */
+	/* Check total BW is valid */
 	if ((100 != *total_bw) || (0 == *total_bw)) {
 		if (0 == *total_bw) {
 			DP(NETIF_MSG_LINK,
-			   "bnx2x_ets_E3B0_config toatl BW shouldn't be 0\n");
+			  "bnx2x_ets_E3B0_config total BW shouldn't be 0\n");
 			return -EINVAL;
 		}
 		DP(NETIF_MSG_LINK,
-		   "bnx2x_ets_E3B0_config toatl BW should be 100\n");
-		/**
-		*   We can handle a case whre the BW isn't 100 this can happen
-		*   if the TC are joined.
-		*/
+		   "bnx2x_ets_E3B0_config total BW should be 100\n");
+		/*
+		 * We can handle a case where the BW isn't 100 this can happen
+		 * if the TC are joined.
+		 */
 	}
 	return 0;
 }
-- 
1.7.2.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help