diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-07-08 21:30:01 +0200 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-03-08 16:24:15 +0100 |
commit | d617808e3b8324eacebabefec49dc75536ee39cc (patch) | |
tree | 5c6db1aff0ddec891b6e7bc12401a7515a2a21a2 | |
parent | firmware: arm_scmi: Fix device node validation for mailbox transport (diff) | |
download | linux-d617808e3b8324eacebabefec49dc75536ee39cc.tar.xz linux-d617808e3b8324eacebabefec49dc75536ee39cc.zip |
firmware: arm_scmi: Use the bitmap API to allocate bitmaps
Use devm_bitmap_zalloc() instead of hand-writing them.
It is less verbose and it improves the semantic.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/c073b1607ada34d5bde6ce1009179cf15bbf0da3.1657308593.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
-rw-r--r-- | drivers/firmware/arm_scmi/driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 15a431639d82..dbc474ff62b7 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -2221,8 +2221,8 @@ static int __scmi_xfer_info_init(struct scmi_info *sinfo, hash_init(info->pending_xfers); /* Allocate a bitmask sized to hold MSG_TOKEN_MAX tokens */ - info->xfer_alloc_table = devm_kcalloc(dev, BITS_TO_LONGS(MSG_TOKEN_MAX), - sizeof(long), GFP_KERNEL); + info->xfer_alloc_table = devm_bitmap_zalloc(dev, MSG_TOKEN_MAX, + GFP_KERNEL); if (!info->xfer_alloc_table) return -ENOMEM; |