[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 5 May 2017 15:19:48 +0200
From: Peter Rosin <peda@...ntia.se>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>, Wolfram Sang <wsa@...-dreams.de>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Jonathan Corbet <corbet@....net>, <linux-i2c@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-iio@...r.kernel.org>,
<linux-doc@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Colin Ian King <colin.king@...onical.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Philipp Zabel <p.zabel@...gutronix.de>, <kernel@...gutronix.de>
Subject: Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux
controller
On 2017-04-18 12:59, Peter Rosin wrote:
> On 2017-04-18 10:51, Greg Kroah-Hartman wrote:
>> On Thu, Apr 13, 2017 at 06:43:07PM +0200, Peter Rosin wrote:
>>> +/**
>>> + * devm_mux_chip_unregister() - Resource-managed version mux_chip_unregister().
>>> + * @dev: The device that originally registered the mux-chip.
>>> + * @mux_chip: The mux-chip to unregister.
>>> + *
>>> + * See mux_chip_unregister() for more details.
>>> + *
>>> + * Note that you do not normally need to call this function.
>>
>> Odd, then why is it exported???
>
> You normally don't call the devm_foo_{free,release,unregister,etc} functions.
> The intention is of course that the resourse cleans up automatically. But there
> are no cases where the manual clean up is not available, at least not that I can
> find?
I had a second look and there are of course plenty of examples of missing clean up
versions for devm function. I simply hadn't looked very hard at all.
So, for v15 I intend to remove all of devm_mux_chip_unregister, devm_mux_chip_free
and devm_mux_control_put. They are all just sitting there with no callers. And the
mux-mmio/video-mux drivers by Philipp Zabel that build on top of this series don't
need them either. Besides, easy to resurrect if needed...
I will do v15 with the above, the change from mutex to semaphore for locking the
mux controller state [1] and a few small documentation improvements. That will be
rebased onto v4.12-rc1 and sent in 10 days or so, or whenever v4.12-rc1 is out.
Meanwhile, what I currently intend for v15 but based on v4.11 is available from
https://gitlab.com/peda-linux/mux.git in the "mux" branch.
Cheers,
peda
[1] https://lkml.org/lkml/2017/4/25/411
Powered by blists - more mailing lists