All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bnx2x: use the right constant
@ 2018-06-06 13:03 ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2018-06-06 13:03 UTC (permalink / raw)
  To: Ariel Elior
  Cc: kernel-janitors, everest-linux-l2, David S. Miller, netdev, linux-kernel

Nearby code that also tests port suggests that the P0 constant should be
used when port is zero.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,e1;
@@

* e ? e1 : e1
// </smpl>


Fixes: 6c3218c6f7e5 ("bnx2x: Adjust ETS to 578xx")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 7dd83d0..22243c4 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -588,7 +588,7 @@ static void bnx2x_ets_e3b0_nig_disabled(const struct link_params *params,
 	 * slots for the highest priority.
 	 */
 	REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS :
-		   NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100);
+		   NIG_REG_P0_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100);
 	/* Mapping between the CREDIT_WEIGHT registers and actual client
 	 * numbers
 	 */

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

* [PATCH] bnx2x: use the right constant
@ 2018-06-06 13:03 ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2018-06-06 13:03 UTC (permalink / raw)
  To: Ariel Elior
  Cc: kernel-janitors, everest-linux-l2, David S. Miller, netdev, linux-kernel

Nearby code that also tests port suggests that the P0 constant should be
used when port is zero.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,e1;
@@

* e ? e1 : e1
// </smpl>


Fixes: 6c3218c6f7e5 ("bnx2x: Adjust ETS to 578xx")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 7dd83d0..22243c4 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -588,7 +588,7 @@ static void bnx2x_ets_e3b0_nig_disabled(const struct link_params *params,
 	 * slots for the highest priority.
 	 */
 	REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS :
-		   NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100);
+		   NIG_REG_P0_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100);
 	/* Mapping between the CREDIT_WEIGHT registers and actual client
 	 * numbers
 	 */


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

* Re: [PATCH] bnx2x: use the right constant
  2018-06-06 13:03 ` Julia Lawall
@ 2018-06-06 18:01   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-06-06 18:01 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: ariel.elior, kernel-janitors, everest-linux-l2, netdev, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Wed,  6 Jun 2018 15:03:22 +0200

> Nearby code that also tests port suggests that the P0 constant should be
> used when port is zero.
> 
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression e,e1;
> @@
> 
> * e ? e1 : e1
> // </smpl>
> 
> Fixes: 6c3218c6f7e5 ("bnx2x: Adjust ETS to 578xx")
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

This definitely looks correct.  Applied and queued up for -stable, thanks!

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

* Re: [PATCH] bnx2x: use the right constant
@ 2018-06-06 18:01   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-06-06 18:01 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: ariel.elior, kernel-janitors, everest-linux-l2, netdev, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Wed,  6 Jun 2018 15:03:22 +0200

> Nearby code that also tests port suggests that the P0 constant should be
> used when port is zero.
> 
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression e,e1;
> @@
> 
> * e ? e1 : e1
> // </smpl>
> 
> Fixes: 6c3218c6f7e5 ("bnx2x: Adjust ETS to 578xx")
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

This definitely looks correct.  Applied and queued up for -stable, thanks!

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

end of thread, other threads:[~2018-06-06 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 13:03 [PATCH] bnx2x: use the right constant Julia Lawall
2018-06-06 13:03 ` Julia Lawall
2018-06-06 18:01 ` David Miller
2018-06-06 18:01   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.