Thread (4 messages) 4 messages, 3 authors, 2019-04-15

Re: [PATCH] PCI: rockchip: fix bitwise operations on status and ROCKCHIP_PCIE_EP_CMD_STATUS_IS

From: Mukesh Ojha <hidden>
Date: 2019-03-30 16:39:06
Also in: kernel-janitors, linux-pci, linux-rockchip, lkml

On 3/30/2019 8:39 PM, Colin King wrote:
From: Colin Ian King <redacted>

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.  (Not tested).

Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Signed-off-by: Colin Ian King <redacted>
---
  drivers/pci/controller/pcie-rockchip-ep.c | 2 +-

Looks valid to me.

Reviewed-by: Mukesh Ojha <redacted>

Cheers,
-Mukesh

quoted hunk ↗ jump to hunk
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c
index a5d799e2dff2..d743b0a48988 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 ||
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help