[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYyFXt1g-fL9dUTwQLnT4senUjvRpehc6yuQ9rV4ztwSA@mail.gmail.com>
Date: Thu, 2 Jan 2014 14:07:25 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Rashika Kheria <rashika.kheria@...il.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kishon Vijay Abraham I <kishon@...com>,
Thierry Reding <thierry.reding@...il.com>,
Alexandre Courbot <acourbot@...dia.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>,
josh@...htriplett.org
Subject: Re: [PATCH] drivers: Remove unused devm_*_put functions
On Sat, Dec 21, 2013 at 11:49 AM, Rashika Kheria
<rashika.kheria@...il.com> wrote:
> Remove unused devm_*_put functions because none of them are
> used anywhere in the kernel and devm does automatic cleanup
> of resources and requires no manual cleanup.
>
> Signed-off-by: Rashika Kheria <rashika.kheria@...il.com>
> Reviewed-by: Josh Triplett <josh@...htriplett.org>
> drivers/gpio/devres.c | 25 -------------------------
> include/linux/gpio/consumer.h | 9 ---------
Can you please split these two hunks on the patch into a separate
patch I can apply to the GPIO tree?
> -static int devm_gpiod_match(struct device *dev, void *res, void *data)
> -{
> - struct gpio_desc **this = res, **gpio = data;
> -
> - return *this == *gpio;
> -}
(...)
> -/**
> - * devm_gpiod_put - Resource-managed gpiod_put()
> - * @desc: GPIO descriptor to dispose of
> - *
> - * Dispose of a GPIO descriptor obtained with devm_gpiod_get() or
> - * devm_gpiod_get_index(). Normally this function will not be called as the GPIO
> - * will be disposed of by the resource management code.
> - */
> -void devm_gpiod_put(struct device *dev, struct gpio_desc *desc)
> -{
> - WARN_ON(devres_release(dev, devm_gpiod_release, devm_gpiod_match,
> - &desc));
> -}
> -EXPORT_SYMBOL(devm_gpiod_put);
Alexandre what do you think about this? Can we think of a scenario
where explicit garbage collection is going to be needed or should we
remove this for now?
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists