aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <[email protected]>2022-07-04 13:15:03 +0000
committerBjorn Helgaas <[email protected]>2022-07-05 20:02:56 +0000
commit52664090101a881ee67eb23e24859d45fce34dc8 (patch)
tree716a9bbbfa769f9080ec1ca16f20e4ba7d842abb
parentLinux 5.19-rc1 (diff)
downloadkernel-52664090101a881ee67eb23e24859d45fce34dc8.tar.gz
kernel-52664090101a881ee67eb23e24859d45fce34dc8.zip
PCI: iproc: Use bitmap API to allocate bitmaps
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Link: https://lore.kernel.org/r/d839a951358ceb447226dc776590a2a38f3e3f9d.1656940469.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Ray Jui <[email protected]>
-rw-r--r--drivers/pci/controller/pcie-iproc-msi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c
index 757b7fbcdc59..fee036b07cd4 100644
--- a/drivers/pci/controller/pcie-iproc-msi.c
+++ b/drivers/pci/controller/pcie-iproc-msi.c
@@ -589,8 +589,8 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node)
msi->has_inten_reg = true;
msi->nr_msi_vecs = msi->nr_irqs * EQ_LEN;
- msi->bitmap = devm_kcalloc(pcie->dev, BITS_TO_LONGS(msi->nr_msi_vecs),
- sizeof(*msi->bitmap), GFP_KERNEL);
+ msi->bitmap = devm_bitmap_zalloc(pcie->dev, msi->nr_msi_vecs,
+ GFP_KERNEL);
if (!msi->bitmap)
return -ENOMEM;