irqchip/partitions: Switch to bitmap_zalloc()
Switch to 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-1-andriy.shevchenko@linux.intel.com
This commit is contained in:
committed by
Marc Zyngier
parent
ff1176468d
commit
4cad4da079
@@ -215,8 +215,7 @@ struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode,
|
|||||||
goto out;
|
goto out;
|
||||||
desc->domain = d;
|
desc->domain = d;
|
||||||
|
|
||||||
desc->bitmap = kcalloc(BITS_TO_LONGS(nr_parts), sizeof(long),
|
desc->bitmap = bitmap_zalloc(nr_parts, GFP_KERNEL);
|
||||||
GFP_KERNEL);
|
|
||||||
if (WARN_ON(!desc->bitmap))
|
if (WARN_ON(!desc->bitmap))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user