Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f2ebfbe authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
Acked-by: default avatarScott Feldman <sfeldma@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e65ad3be
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}