Skip to content

Commit 43a1965

Browse files
andy-shevMarc Zyngier
authored andcommitted
irqchip/ls-scfg-msi: Switch to devm_bitmap_zalloc()
Switch to devm_bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ff5fe88 commit 43a1965

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/irqchip/irq-ls-scfg-msi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,7 @@ static int ls_scfg_msi_probe(struct platform_device *pdev)
362362

363363
msi_data->irqs_num = MSI_IRQS_PER_MSIR *
364364
(1 << msi_data->cfg->ibs_shift);
365-
msi_data->used = devm_kcalloc(&pdev->dev,
366-
BITS_TO_LONGS(msi_data->irqs_num),
367-
sizeof(*msi_data->used),
368-
GFP_KERNEL);
365+
msi_data->used = devm_bitmap_zalloc(&pdev->dev, msi_data->irqs_num, GFP_KERNEL);
369366
if (!msi_data->used)
370367
return -ENOMEM;
371368
/*

0 commit comments

Comments
 (0)