lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Jul 2015 09:13:51 +0900
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Mark Brown <broonie@...nel.org>,
	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Chris Zhong <zyw@...k-chips.com>, kernel@...gutronix.de,
	linux-pm@...r.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Kevin Hilman <khilman@...nel.org>
Subject: Re: [PATCH] regulator: rk808: make better use of the gpiod API

On 21.07.2015 23:41, Mark Brown wrote:
> On Tue, Jul 21, 2015 at 04:35:24PM +0200, Uwe Kleine-König wrote:
>> On Tue, Jul 21, 2015 at 10:09:32PM +0900, Krzysztof Kozlowski wrote:
> 
>>> The function looks empty so it can be removed entirely.
> 
>> I assumed that not having a remove function makes the device not
>> detachable. Not sure about that.
> 
> No, of course not - the remove function is completely optional.
> 
>> Looking at the code I found that not having a remove function can yield
>> surprises, though. If your driver has a probe but no remove function the
>> platform bus glue calls
> 
>> 	dev_pm_domain_attach(_dev, true);
> 
>> at probe time, but not
> 
>> 	dev_pm_domain_detach(_dev, true);
> 
>> at remove. I admit I don't know about that dev_pm_domain stuff, but it
>> looks wrong to only have one but not the other. Greg?
> 
> That looks like a bug, yes.

Cc: linux-pm, Kevin, Rafael, Ulf

I agree, device should be detached from domain regardless of presence of
remove callback.

Documentation (like Documentation/driver-model/driver.txt) does not
mention that remove callback is necessary for unbinding devices. There
is no sense in storing empty removal callbacks.

Best regards,
Krzysztof
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ