Re: [PATCH] liquidio: Fix unintented sign extension of a left shift of a u16

2021-04-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 7 Apr 2021 11:12:48 +0100 you wrote: > From: Colin Ian King > > The macro CN23XX_PEM_BAR1_INDEX_REG is being used to shift oct->pcie_port > (a u16) left 24 places. There are two subtle issues here, first the > sh

[PATCH] liquidio: Fix unintented sign extension of a left shift of a u16

2021-04-07 Thread Colin King
From: Colin Ian King The macro CN23XX_PEM_BAR1_INDEX_REG is being used to shift oct->pcie_port (a u16) left 24 places. There are two subtle issues here, first the shift gets promoted to an signed int and then sign extended to a u64. If oct->pcie_port is 0x80 or more then the upper bits get sign e