Message ID | 3ee11e9e83f7c1552d237f5c28f554319fcbbf1f.1657308216.git.christophe.jaillet@wanadoo.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] firmware: ti_sci: Use the bitmap API to allocate bitmaps | expand |
Hi Christophe JAILLET, On Fri, 8 Jul 2022 21:23:46 +0200, Christophe JAILLET wrote: > Use devm_bitmap_zalloc() instead of hand-writing them. > > It is less verbose and it improves the semantic. > > I have applied the following to branch ti-drivers-soc-next on [1]. Thank you! [1/2] firmware: ti_sci: Use the bitmap API to allocate bitmaps commit: 2f9b0402755c1320420825ea8cda27a5f18e0ac4 [2/2] firmware: ti_sci: Use the non-atomic bitmap API when applicable commit: 4dc3883203736dcd979672ac8d9f086dbd4d2140 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. [1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index ebc32bbd9b83..522be2b75ce1 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -3201,9 +3201,8 @@ devm_ti_sci_get_resource_sets(const struct ti_sci_handle *handle, valid_set = true; res_count = res->desc[i].num + res->desc[i].num_sec; - res->desc[i].res_map = - devm_kzalloc(dev, BITS_TO_LONGS(res_count) * - sizeof(*res->desc[i].res_map), GFP_KERNEL); + res->desc[i].res_map = devm_bitmap_zalloc(dev, res_count, + GFP_KERNEL); if (!res->desc[i].res_map) return ERR_PTR(-ENOMEM); }
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/ti_sci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)