Commit 3db3969f authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Marc Zyngier

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210618151657.65305-6-andriy.shevchenko@linux.intel.com
parent 43a1965f
...@@ -210,9 +210,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev) ...@@ -210,9 +210,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
gicp->spi_cnt += gicp->spi_ranges[i].count; gicp->spi_cnt += gicp->spi_ranges[i].count;
} }
gicp->spi_bitmap = devm_kcalloc(&pdev->dev, gicp->spi_bitmap = devm_bitmap_zalloc(&pdev->dev, gicp->spi_cnt, GFP_KERNEL);
BITS_TO_LONGS(gicp->spi_cnt), sizeof(long),
GFP_KERNEL);
if (!gicp->spi_bitmap) if (!gicp->spi_bitmap)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment