Thread (42 messages) 42 messages, 7 authors, 2014-09-17

Re: [v4,1/9] ACPI / PM: Let acpi_dev_pm_detach() return an error code

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2014-09-15 16:53:59
Also in: linux-acpi, linux-arm-kernel, linux-devicetree

On Sun, Sep 14, 2014 at 06:38:58PM +0200, Rafael J. Wysocki wrote:
On Friday, September 12, 2014 02:05:53 PM Dmitry Torokhov wrote:
quoted
Hi Ulf,

On Tue, Sep 09, 2014 at 01:36:02PM +0200, Ulf Hansson wrote:
quoted
To give callers the option of acting on a errors while removing the
pm_domain ops for the device in the ACPI PM domain, let
acpi_dev_pm_detach() return an int to provide the error code.
So how would callers handle the errors? As far as I can see
acpi_dev_pm_detach() is called from ->remove() and ->shutdown() methods, where
there is no meaningful strategy to handle errors as you are past the point of
no return and you keep on tearing down the device.
This is specifically for what patch [3/9] is doing AFAICS.  

The existing callers don't need to worry about this.
OK, so I have the very same comment about patch 3 then: we have
dev_pm_domain_detach() returning error. How would the callers handle errors?

WRT this patch: I'd rater we did not just return generic "error code" just
because we do not know who manages PD for the device. Can we add API to check
if we are using ACPI to manage power domains? Then patch #3 could check if it
needs to use ACPI or generic power domain API.

Thanks.

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