mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
rocker: fix link status detection in rocker_carrier_init()
Since '1 << rocker_port->pport' may be undefined for port >= 32, cast the left operand to 'unsigned long long' like it's done in 'rocker_port_set_enable()' above. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Link: https://patch.msgid.link/20241114151946.519047-1-dmantipov@yandex.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a0c80d5108
commit
e64285ff41
|
@ -2502,7 +2502,7 @@ static void rocker_carrier_init(const struct rocker_port *rocker_port)
|
|||
u64 link_status = rocker_read64(rocker, PORT_PHYS_LINK_STATUS);
|
||||
bool link_up;
|
||||
|
||||
link_up = link_status & (1 << rocker_port->pport);
|
||||
link_up = link_status & (1ULL << rocker_port->pport);
|
||||
if (link_up)
|
||||
netif_carrier_on(rocker_port->dev);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user