[PATCH] mmc: pwrseq: Use bitmap_free() to free bitmap

Subsystems: multimedia card (mmc), secure digital (sd) and sdio subsystem, the rest

STALE1682d LANDED

Landed in mainline as 28df143340b5 on 2021-12-28.

2 messages, 2 authors, 2021-12-28 · open the first message on its own page

[PATCH] mmc: pwrseq: Use bitmap_free() to free bitmap

From: Christophe JAILLET <hidden>
Date: 2021-12-26 14:15:41

kfree() and bitmap_free() are the same. But using the later is more
consistent when freeing memory allocated with bitmap_alloc().

Signed-off-by: Christophe JAILLET <redacted>
---
 drivers/mmc/core/pwrseq_simple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c
index ea4d3670560e..988467fbb621 100644
--- a/drivers/mmc/core/pwrseq_simple.c
+++ b/drivers/mmc/core/pwrseq_simple.c
@@ -54,7 +54,7 @@ static void mmc_pwrseq_simple_set_gpios_value(struct mmc_pwrseq_simple *pwrseq,
 		gpiod_set_array_value_cansleep(nvalues, reset_gpios->desc,
 					       reset_gpios->info, values);
 
-		kfree(values);
+		bitmap_free(values);
 	}
 }
 
-- 
2.32.0

Re: [PATCH] mmc: pwrseq: Use bitmap_free() to free bitmap

From: Ulf Hansson <hidden>
Date: 2021-12-28 16:58:44

On Sun, 26 Dec 2021 at 15:15, Christophe JAILLET
[off-list ref] wrote:
kfree() and bitmap_free() are the same. But using the later is more
consistent when freeing memory allocated with bitmap_alloc().

Signed-off-by: Christophe JAILLET <redacted>
Applied for next, thanks!

Kind regards
Uffe

quoted hunk
---
 drivers/mmc/core/pwrseq_simple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c
index ea4d3670560e..988467fbb621 100644
--- a/drivers/mmc/core/pwrseq_simple.c
+++ b/drivers/mmc/core/pwrseq_simple.c
@@ -54,7 +54,7 @@ static void mmc_pwrseq_simple_set_gpios_value(struct mmc_pwrseq_simple *pwrseq,
                gpiod_set_array_value_cansleep(nvalues, reset_gpios->desc,
                                               reset_gpios->info, values);

-               kfree(values);
+               bitmap_free(values);
        }
 }

--
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help