From: Cristian Marussi <cristian.marussi@arm.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] firmware: arm_scmi: Use the bitmap API to allocate bitmaps
Date: Wed, 13 Jul 2022 11:45:52 +0100 [thread overview]
Message-ID: <Ys6iYFr/nTOmjW7i@e120937-lin> (raw)
In-Reply-To: <c073b1607ada34d5bde6ce1009179cf15bbf0da3.1657308593.git.christophe.jaillet@wanadoo.fr>
On Fri, Jul 08, 2022 at 09:30:01PM +0200, Christophe JAILLET wrote:
> 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>
> ---
> drivers/firmware/arm_scmi/driver.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> index 609ebedee9cb..b1265732d83a 100644
> --- a/drivers/firmware/arm_scmi/driver.c
> +++ b/drivers/firmware/arm_scmi/driver.c
> @@ -1911,8 +1911,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;
>
LGTM.
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Thanks,
Cristian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-07-13 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 19:30 [PATCH] firmware: arm_scmi: Use the bitmap API to allocate bitmaps Christophe JAILLET
2022-07-13 10:45 ` Cristian Marussi [this message]
2023-03-20 11:19 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ys6iYFr/nTOmjW7i@e120937-lin \
--to=cristian.marussi@arm.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox