* [PATCH] PCI: rockchip: fix find_first_zero_bit() limit
@ 2022-03-15 6:59 Dan Carpenter
2022-04-08 13:43 ` Lorenzo Pieralisi
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-03-15 6:59 UTC (permalink / raw)
To: Shawn Lin
Cc: Lorenzo Pieralisi, Rob Herring, Krzysztof Wilczyński,
Bjorn Helgaas, Heiko Stuebner, linux-pci, linux-rockchip,
kernel-janitors
The ep->ob_region_map bitmap is a long and it has BITS_PER_LONG bits.
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/pci/controller/pcie-rockchip-ep.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c
index 5fb9ce6e536e..d1a200b93b2b 100644
--- a/drivers/pci/controller/pcie-rockchip-ep.c
+++ b/drivers/pci/controller/pcie-rockchip-ep.c
@@ -264,8 +264,7 @@ static int rockchip_pcie_ep_map_addr(struct pci_epc *epc, u8 fn, u8 vfn,
struct rockchip_pcie *pcie = &ep->rockchip;
u32 r;
- r = find_first_zero_bit(&ep->ob_region_map,
- sizeof(ep->ob_region_map) * BITS_PER_LONG);
+ r = find_first_zero_bit(&ep->ob_region_map, BITS_PER_LONG);
/*
* Region 0 is reserved for configuration space and shouldn't
* be used elsewhere per TRM, so leave it out.
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: rockchip: fix find_first_zero_bit() limit
2022-03-15 6:59 [PATCH] PCI: rockchip: fix find_first_zero_bit() limit Dan Carpenter
@ 2022-04-08 13:43 ` Lorenzo Pieralisi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2022-04-08 13:43 UTC (permalink / raw)
To: Shawn Lin, Dan Carpenter
Cc: Lorenzo Pieralisi, kernel-janitors, linux-pci,
Krzysztof Wilczyński, linux-rockchip, Rob Herring,
Bjorn Helgaas, Heiko Stuebner
On Tue, 15 Mar 2022 09:59:44 +0300, Dan Carpenter wrote:
> The ep->ob_region_map bitmap is a long and it has BITS_PER_LONG bits.
>
>
Applied to pci/rockchip, thanks!
[1/1] PCI: rockchip: fix find_first_zero_bit() limit
https://git.kernel.org/lpieralisi/pci/c/096950e230
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-08 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15 6:59 [PATCH] PCI: rockchip: fix find_first_zero_bit() limit Dan Carpenter
2022-04-08 13:43 ` Lorenzo Pieralisi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).