bnx2x: use the right constant
commitd591263c7947e5dd5f7e2b824c1a629b84044530
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 6 Jun 2018 13:03:22 +0000 (6 15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jun 2018 20:49:18 +0000 (11 22:49 +0200)
tree6139a4ed958e94216bbc7056b4c095431ebf3ef7
parent128f0d700569d70e9ac03bd65b8313357e22736c
bnx2x: use the right constant

[ Upstream commit dd612f18a49b63af8b3a5f572d999bdb197385bc ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c