]> www.infradead.org Git - users/dwmw2/linux.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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Nov 2024 02:39:21 +0000 (18:39 -0800)
commite64285ff41bb7a934bd815bd38f31119be62ac37
treeb9e1472f1064849661797e87a41648de94fc8560
parenta0c80d5108ab36cf6cc974a24ce9c522f271d754
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>
drivers/net/ethernet/rocker/rocker_main.c