diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-06-18 18:16:54 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-07-26 18:04:01 +0100 |
commit | ff5fe8867a5feaf90b1cb9b766f3de3a1caf9f33 (patch) | |
tree | 0cfe7f32cfa75db192294b91ddb1eea17cb0ffa4 /drivers/irqchip/irq-gic-v3-mbi.c | |
parent | 81d3c9e7b43e9426e67a5df66d51a5f2bfce0362 (diff) | |
download | lwn-ff5fe8867a5feaf90b1cb9b766f3de3a1caf9f33.tar.gz lwn-ff5fe8867a5feaf90b1cb9b766f3de3a1caf9f33.zip |
irqchip/gic-v3: 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-4-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'drivers/irqchip/irq-gic-v3-mbi.c')
-rw-r--r-- | drivers/irqchip/irq-gic-v3-mbi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-gic-v3-mbi.c b/drivers/irqchip/irq-gic-v3-mbi.c index e81e89a81cb5..b84c9c2eccdc 100644 --- a/drivers/irqchip/irq-gic-v3-mbi.c +++ b/drivers/irqchip/irq-gic-v3-mbi.c @@ -290,8 +290,7 @@ int __init mbi_init(struct fwnode_handle *fwnode, struct irq_domain *parent) if (ret) goto err_free_mbi; - mbi_ranges[n].bm = kcalloc(BITS_TO_LONGS(mbi_ranges[n].nr_spis), - sizeof(long), GFP_KERNEL); + mbi_ranges[n].bm = bitmap_zalloc(mbi_ranges[n].nr_spis, GFP_KERNEL); if (!mbi_ranges[n].bm) { ret = -ENOMEM; goto err_free_mbi; @@ -329,7 +328,7 @@ int __init mbi_init(struct fwnode_handle *fwnode, struct irq_domain *parent) err_free_mbi: if (mbi_ranges) { for (n = 0; n < mbi_range_nr; n++) - kfree(mbi_ranges[n].bm); + bitmap_free(mbi_ranges[n].bm); kfree(mbi_ranges); } |