]> 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 19:03:57 +0000 (20:03 +0100)
commit4f995f5b1633b6e064160728e71e61973bb1046a
treee3b4a19359a4e9955fd347ccbdc18e64f1b430c3
parentf5cc301e98a6462cf6be7d8629c8452067e7b639
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