Skip to content

Commit c980983

Browse files
andy-shevMarc Zyngier
authored andcommitted
irqchip/mvebu-odmi: 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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3db3969 commit c980983

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/irqchip/irq-mvebu-odmi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ static int __init mvebu_odmi_init(struct device_node *node,
171171
if (!odmis)
172172
return -ENOMEM;
173173

174-
odmis_bm = kcalloc(BITS_TO_LONGS(odmis_count * NODMIS_PER_FRAME),
175-
sizeof(long), GFP_KERNEL);
174+
odmis_bm = bitmap_zalloc(odmis_count * NODMIS_PER_FRAME, GFP_KERNEL);
176175
if (!odmis_bm) {
177176
ret = -ENOMEM;
178177
goto err_alloc;
@@ -227,7 +226,7 @@ static int __init mvebu_odmi_init(struct device_node *node,
227226
if (odmi->base && !IS_ERR(odmi->base))
228227
iounmap(odmis[i].base);
229228
}
230-
kfree(odmis_bm);
229+
bitmap_free(odmis_bm);
231230
err_alloc:
232231
kfree(odmis);
233232
return ret;

0 commit comments

Comments
 (0)