[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <162731954972.395.4894923090543170959.tip-bot2@tip-bot2>
Date: Mon, 26 Jul 2021 17:12:29 -0000
From: "irqchip-bot for Andy Shevchenko" <tip-bot2@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Marc Zyngier <maz@...nel.org>, tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/alpine-msi: Switch to bitmap_zalloc()
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 3f1808f63f0458762403549b3d975ef6e971b6e0
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/3f1808f63f0458762403549b3d975ef6e971b6e0
Author: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
AuthorDate: Fri, 18 Jun 2021 18:16:52 +03:00
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Mon, 26 Jul 2021 18:01:44 +01:00
irqchip/alpine-msi: 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@...ux.intel.com>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20210618151657.65305-2-andriy.shevchenko@linux.intel.com
---
drivers/irqchip/irq-alpine-msi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index ede02dc..5ddb8e5 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -267,9 +267,7 @@ static int alpine_msix_init(struct device_node *node,
goto err_priv;
}
- priv->msi_map = kcalloc(BITS_TO_LONGS(priv->num_spis),
- sizeof(*priv->msi_map),
- GFP_KERNEL);
+ priv->msi_map = bitmap_zalloc(priv->num_spis, GFP_KERNEL);
if (!priv->msi_map) {
ret = -ENOMEM;
goto err_priv;
@@ -285,7 +283,7 @@ static int alpine_msix_init(struct device_node *node,
return 0;
err_map:
- kfree(priv->msi_map);
+ bitmap_free(priv->msi_map);
err_priv:
kfree(priv);
return ret;
Powered by blists - more mailing lists