diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-02-25 16:36:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-27 23:53:44 +0300 |
commit | 5f2ebfbee68872762ad76f735277ed7afa074d76 (patch) | |
tree | 9b1d24eda2cfcd0ae10e8e9839baa26433c07fd0 /drivers/net/ethernet/rocker/rocker.c | |
parent | e65ad3be869b45f90a401d8ce4d4e7381c99ceb0 (diff) | |
download | linux-5f2ebfbee68872762ad76f735277ed7afa074d76.tar.xz |
rocker: silence shift wrapping warning
"val" is declared as a u64 so static checkers complain that this shift
can wrap. I don't have the hardware but probably it's doesn't have over
31 ports. Still we may as well silence the warning even if it's not a
real bug.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/rocker/rocker.c')
-rw-r--r-- | drivers/net/ethernet/rocker/rocker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c index 713a13cb8c14..9fb6948e14c6 100644 --- a/drivers/net/ethernet/rocker/rocker.c +++ b/drivers/net/ethernet/rocker/rocker.c @@ -1257,9 +1257,9 @@ static void rocker_port_set_enable(struct rocker_port *rocker_port, bool enable) u64 val = rocker_read64(rocker_port->rocker, PORT_PHYS_ENABLE); if (enable) - val |= 1 << rocker_port->lport; + val |= 1ULL << rocker_port->lport; else - val &= ~(1 << rocker_port->lport); + val &= ~(1ULL << rocker_port->lport); rocker_write64(rocker_port->rocker, PORT_PHYS_ENABLE, val); } |