]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rocker: fix link status detection in rocker_carrier_init()
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 14 Nov 2024 15:19:46 +0000 (18:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:40 +0000 (19:51 +0100)
commit4e83046d2bc9673dc8cc8e1a967fb843cdef1093
treeffc26769dfd37d6689adb9fa7c361a6735c547cd
parent565dca66578a85a3b28b74ce29f1eac348d7c8e7
rocker: fix link status detection in rocker_carrier_init()

[ Upstream commit e64285ff41bb7a934bd815bd38f31119be62ac37 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/rocker/rocker_main.c