diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-12-23 08:54:41 +0100 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2022-01-31 15:42:19 -0600 |
commit | a9ff0638a4063e6b8a0aa38e9995826565f3d529 (patch) | |
tree | ccb4d461f4773899703c770ca6758658b62cf676 /drivers/soc/qcom/llcc-qcom.c | |
parent | 071a13332de894cb3c38b17c82350f1e4167c023 (diff) |
soc: qcom: llcc: Use devm_bitmap_zalloc() when applicable
'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>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/3ee83f75afa8754fade4fff6a03b57f0ae3ccc28.1640245993.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'drivers/soc/qcom/llcc-qcom.c')
-rw-r--r-- | drivers/soc/qcom/llcc-qcom.c | 5 |
1 files 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; |