summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/ti_sci.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-07-08 21:23:46 +0200
committerNishanth Menon <nm@ti.com>2022-10-28 08:20:17 -0500
commit2f9b0402755c1320420825ea8cda27a5f18e0ac4 (patch)
tree3c66d1ba5a37a9ec3b83c3d26d1baf263045f7eb /drivers/firmware/ti_sci.c
parentadf85adc2a7199b41e7a4da083bd17274a3d6969 (diff)
downloadlinux-stable-2f9b0402755c1320420825ea8cda27a5f18e0ac4.tar.gz
linux-stable-2f9b0402755c1320420825ea8cda27a5f18e0ac4.tar.bz2
linux-stable-2f9b0402755c1320420825ea8cda27a5f18e0ac4.zip
firmware: ti_sci: 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> Signed-off-by: Nishanth Menon <nm@ti.com> Link: https://lore.kernel.org/r/3ee11e9e83f7c1552d237f5c28f554319fcbbf1f.1657308216.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'drivers/firmware/ti_sci.c')
-rw-r--r--drivers/firmware/ti_sci.c5
1 files changed, 2 insertions, 3 deletions
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);
}