All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: max3191x: Use bitmap_free() to free bitmap
@ 2021-12-26 14:19 Christophe JAILLET
  2022-01-03  9:43 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-12-26 14:19 UTC (permalink / raw)
  To: linus.walleij, brgl
  Cc: linux-gpio, linux-kernel, kernel-janitors, Christophe JAILLET

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 <christophe.jaillet@wanadoo.fr>
---
 drivers/gpio/gpio-max3191x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-max3191x.c b/drivers/gpio/gpio-max3191x.c
index 310d1a248cae..51cd6f98d1c7 100644
--- a/drivers/gpio/gpio-max3191x.c
+++ b/drivers/gpio/gpio-max3191x.c
@@ -326,7 +326,7 @@ static void gpiod_set_array_single_value_cansleep(unsigned int ndescs,
 		bitmap_zero(values, ndescs);
 
 	gpiod_set_array_value_cansleep(ndescs, desc, info, values);
-	kfree(values);
+	bitmap_free(values);
 }
 
 static struct gpio_descs *devm_gpiod_get_array_optional_count(
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: max3191x: Use bitmap_free() to free bitmap
  2021-12-26 14:19 [PATCH] gpio: max3191x: Use bitmap_free() to free bitmap Christophe JAILLET
@ 2022-01-03  9:43 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2022-01-03  9:43 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Linus Walleij, open list:GPIO SUBSYSTEM,
	Linux Kernel Mailing List, kernel-janitors

On Sun, Dec 26, 2021 at 3:19 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> 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 <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/gpio/gpio-max3191x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-max3191x.c b/drivers/gpio/gpio-max3191x.c
> index 310d1a248cae..51cd6f98d1c7 100644
> --- a/drivers/gpio/gpio-max3191x.c
> +++ b/drivers/gpio/gpio-max3191x.c
> @@ -326,7 +326,7 @@ static void gpiod_set_array_single_value_cansleep(unsigned int ndescs,
>                 bitmap_zero(values, ndescs);
>
>         gpiod_set_array_value_cansleep(ndescs, desc, info, values);
> -       kfree(values);
> +       bitmap_free(values);
>  }
>
>  static struct gpio_descs *devm_gpiod_get_array_optional_count(
> --
> 2.32.0
>

Good point, applied.

Bart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-03  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-26 14:19 [PATCH] gpio: max3191x: Use bitmap_free() to free bitmap Christophe JAILLET
2022-01-03  9:43 ` Bartosz Golaszewski

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.