Skip to content

Commit 5266409

Browse files
tititiou36bjorn-helgaas
authored andcommitted
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 <christophe.jaillet@wanadoo.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Ray Jui <ray.jui@broadcom.com>
1 parent f2906aa commit 5266409

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pci/controller/pcie-iproc-msi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node)
589589
msi->has_inten_reg = true;
590590

591591
msi->nr_msi_vecs = msi->nr_irqs * EQ_LEN;
592-
msi->bitmap = devm_kcalloc(pcie->dev, BITS_TO_LONGS(msi->nr_msi_vecs),
593-
sizeof(*msi->bitmap), GFP_KERNEL);
592+
msi->bitmap = devm_bitmap_zalloc(pcie->dev, msi->nr_msi_vecs,
593+
GFP_KERNEL);
594594
if (!msi->bitmap)
595595
return -ENOMEM;
596596

0 commit comments

Comments
 (0)