From: Colin Ian King Date: Sat, 30 Mar 2019 15:09:10 +0000 (+0000) Subject: PCI: rockchip: Fix rockchip_pcie_ep_assert_intx() bitwise operations X-Git-Tag: v4.19.99~330 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80198980a2274409c8627e0e65b52dd51b5cf962;p=thirdparty%2Fkernel%2Fstable.git PCI: rockchip: Fix rockchip_pcie_ep_assert_intx() bitwise operations [ Upstream commit c577f4a5a08bb9677e12ddafb62e2f3a901de87f ] Currently the bitwise operations on the u16 variable 'status' with the setting ROCKCHIP_PCIE_EP_CMD_STATUS_IS are incorrect because ROCKCHIP_PCIE_EP_CMD_STATUS_IS is 1UL<<19 which is wider than the u16 variable. Fix this by making status a u32. Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller") Signed-off-by: Colin Ian King Signed-off-by: Lorenzo Pieralisi Reviewed-by: Mukesh Ojha Acked-by: Shawn Lin Signed-off-by: Sasha Levin --- diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c index b8163c56a142d..caf34661d38d4 100644 --- a/drivers/pci/controller/pcie-rockchip-ep.c +++ b/drivers/pci/controller/pcie-rockchip-ep.c @@ -350,7 +350,7 @@ static void rockchip_pcie_ep_assert_intx(struct rockchip_pcie_ep *ep, u8 fn, struct rockchip_pcie *rockchip = &ep->rockchip; u32 r = ep->max_regions - 1; u32 offset; - u16 status; + u32 status; u8 msg_code; if (unlikely(ep->irq_pci_addr != ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR ||