* [PATCH] soc: qcom: llcc: Use devm_bitmap_zalloc() when applicable
@ 2021-12-23 7:54 Christophe JAILLET
2022-02-04 18:35 ` (subset) " Bjorn Andersson
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-12-23 7:54 UTC (permalink / raw)
To: agross, bjorn.andersson
Cc: linux-arm-msm, linux-kernel, kernel-janitors, Christophe JAILLET
'drv_data->bitmap' is a bitmap. So use 'devm_bitmap_zalloc()' to simplify
code, improve the semantic.
This also fixes a spurious indentation.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/soc/qcom/llcc-qcom.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
index ec52f29c8867..00274a93406b 100644
--- a/drivers/soc/qcom/llcc-qcom.c
+++ b/drivers/soc/qcom/llcc-qcom.c
@@ -632,9 +632,8 @@ static int qcom_llcc_probe(struct platform_device *pdev)
for (i = 0; i < num_banks; i++)
drv_data->offsets[i] = i * BANK_OFFSET_STRIDE;
- drv_data->bitmap = devm_kcalloc(dev,
- BITS_TO_LONGS(drv_data->max_slices), sizeof(unsigned long),
- GFP_KERNEL);
+ drv_data->bitmap = devm_bitmap_zalloc(dev, drv_data->max_slices,
+ GFP_KERNEL);
if (!drv_data->bitmap) {
ret = -ENOMEM;
goto err;
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] soc: qcom: llcc: Use devm_bitmap_zalloc() when applicable
2021-12-23 7:54 [PATCH] soc: qcom: llcc: Use devm_bitmap_zalloc() when applicable Christophe JAILLET
@ 2022-02-04 18:35 ` Bjorn Andersson
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2022-02-04 18:35 UTC (permalink / raw)
To: agross, Christophe JAILLET; +Cc: kernel-janitors, linux-arm-msm, linux-kernel
On Thu, 23 Dec 2021 08:54:41 +0100, Christophe JAILLET wrote:
> 'drv_data->bitmap' is a bitmap. So use 'devm_bitmap_zalloc()' to simplify
> code, improve the semantic.
>
> This also fixes a spurious indentation.
>
>
Applied, thanks!
[1/1] soc: qcom: llcc: Use devm_bitmap_zalloc() when applicable
commit: a9ff0638a4063e6b8a0aa38e9995826565f3d529
Best regards,
--
Bjorn Andersson <bjorn.andersson@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-04 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 7:54 [PATCH] soc: qcom: llcc: Use devm_bitmap_zalloc() when applicable Christophe JAILLET
2022-02-04 18:35 ` (subset) " Bjorn Andersson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.