]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: use the right constant
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 6 Jun 2018 13:03:22 +0000 (15:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jun 2018 18:01:03 +0000 (14:01 -0400)
commit96c1e37b6be6e3d4f450c57dcf82f971fd87540a
tree8799318430a7301b07a2422452ec03074a91b18c
parent2d72a5fc17fc9e847397f36346617eb8e6bee57a
bnx2x: use the right constant

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: 5b26fbe222eb ("bnx2x: Adjust ETS to 578xx")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c