summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-06-18 17:16:55 +0200
committerMarc Zyngier <maz@kernel.org>2021-07-26 19:04:10 +0200
commit43a1965fc5ae911c83a49ad793677aa6ba0e18e2 (patch)
tree23793a52df99e0f7a42ad4f1098fdbaff502a58c
parentirqchip/gic-v3: Switch to bitmap_zalloc() (diff)
downloadlinux-43a1965fc5ae911c83a49ad793677aa6ba0e18e2.tar.xz
linux-43a1965fc5ae911c83a49ad793677aa6ba0e18e2.zip
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 <andriy.shevchenko@linux.intel.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210618151657.65305-5-andriy.shevchenko@linux.intel.com
-rw-r--r--drivers/irqchip/irq-ls-scfg-msi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c
index 55322da51c56..b4927e425f7b 100644
--- a/drivers/irqchip/irq-ls-scfg-msi.c
+++ b/drivers/irqchip/irq-ls-scfg-msi.c
@@ -362,10 +362,7 @@ static int ls_scfg_msi_probe(struct platform_device *pdev)
msi_data->irqs_num = MSI_IRQS_PER_MSIR *
(1 << msi_data->cfg->ibs_shift);
- msi_data->used = devm_kcalloc(&pdev->dev,
- BITS_TO_LONGS(msi_data->irqs_num),
- sizeof(*msi_data->used),
- GFP_KERNEL);
+ msi_data->used = devm_bitmap_zalloc(&pdev->dev, msi_data->irqs_num, GFP_KERNEL);
if (!msi_data->used)
return -ENOMEM;
/*