diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-06-18 18:16:57 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-07-26 18:04:11 +0100 |
commit | c980983daebf10633c922998bade3a7fd74f1fc1 (patch) | |
tree | fc7b074a737600b1bf64f666734973aea4283603 | |
parent | 3db3969f5375fe0a43c03cb4b55ed643585b140d (diff) | |
download | lwn-c980983daebf10633c922998bade3a7fd74f1fc1.tar.gz lwn-c980983daebf10633c922998bade3a7fd74f1fc1.zip |
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210618151657.65305-7-andriy.shevchenko@linux.intel.com
-rw-r--r-- | drivers/irqchip/irq-mvebu-odmi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-mvebu-odmi.c b/drivers/irqchip/irq-mvebu-odmi.c index b4d367868dbb..dc4145abdd6f 100644 --- a/drivers/irqchip/irq-mvebu-odmi.c +++ b/drivers/irqchip/irq-mvebu-odmi.c @@ -171,8 +171,7 @@ static int __init mvebu_odmi_init(struct device_node *node, if (!odmis) return -ENOMEM; - odmis_bm = kcalloc(BITS_TO_LONGS(odmis_count * NODMIS_PER_FRAME), - sizeof(long), GFP_KERNEL); + odmis_bm = bitmap_zalloc(odmis_count * NODMIS_PER_FRAME, GFP_KERNEL); if (!odmis_bm) { ret = -ENOMEM; goto err_alloc; @@ -227,7 +226,7 @@ err_unmap: if (odmi->base && !IS_ERR(odmi->base)) iounmap(odmis[i].base); } - kfree(odmis_bm); + bitmap_free(odmis_bm); err_alloc: kfree(odmis); return ret; |