Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip/mvebu-gicp: 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-6-andriy.shevchenko@linux.intel.com

authored by

Andy Shevchenko and committed by
Marc Zyngier
3db3969f 43a1965f

+1 -3
+1 -3
drivers/irqchip/irq-mvebu-gicp.c
··· 210 210 gicp->spi_cnt += gicp->spi_ranges[i].count; 211 211 } 212 212 213 - gicp->spi_bitmap = devm_kcalloc(&pdev->dev, 214 - BITS_TO_LONGS(gicp->spi_cnt), sizeof(long), 215 - GFP_KERNEL); 213 + gicp->spi_bitmap = devm_bitmap_zalloc(&pdev->dev, gicp->spi_cnt, GFP_KERNEL); 216 214 if (!gicp->spi_bitmap) 217 215 return -ENOMEM; 218 216