* [PATCH RESEND] driver core: always handle dpm_order
@ 2012-04-23 7:16 Linus Walleij
2012-04-23 11:47 ` Rafael J. Wysocki
2012-04-23 15:43 ` Greg Kroah-Hartman
0 siblings, 2 replies; 9+ messages in thread
From: Linus Walleij @ 2012-04-23 7:16 UTC (permalink / raw)
To: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki
Cc: Rabin Vincent, Linus Walleij
From: Rabin Vincent <rabin.vincent@stericsson.com>
If !dev->class, device_move() does not respect the dpm_order.
Fix it to do so.
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
[Fixed a small dangling label compile warning]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/base/core.c | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index e28ce98..f428321 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1753,25 +1753,25 @@ int device_move(struct device *dev, struct device *new_parent,
set_dev_node(dev, dev_to_node(new_parent));
}
- if (!dev->class)
- goto out_put;
- error = device_move_class_links(dev, old_parent, new_parent);
- if (error) {
- /* We ignore errors on cleanup since we're hosed anyway... */
- device_move_class_links(dev, new_parent, old_parent);
- if (!kobject_move(&dev->kobj, &old_parent->kobj)) {
- if (new_parent)
- klist_remove(&dev->p->knode_parent);
- dev->parent = old_parent;
- if (old_parent) {
- klist_add_tail(&dev->p->knode_parent,
- &old_parent->p->klist_children);
- set_dev_node(dev, dev_to_node(old_parent));
+ if (dev->class) {
+ error = device_move_class_links(dev, old_parent, new_parent);
+ if (error) {
+ /* We ignore errors on cleanup since we're hosed anyway... */
+ device_move_class_links(dev, new_parent, old_parent);
+ if (!kobject_move(&dev->kobj, &old_parent->kobj)) {
+ if (new_parent)
+ klist_remove(&dev->p->knode_parent);
+ dev->parent = old_parent;
+ if (old_parent) {
+ klist_add_tail(&dev->p->knode_parent,
+ &old_parent->p->klist_children);
+ set_dev_node(dev, dev_to_node(old_parent));
+ }
}
+ cleanup_glue_dir(dev, new_parent_kobj);
+ put_device(new_parent);
+ goto out;
}
- cleanup_glue_dir(dev, new_parent_kobj);
- put_device(new_parent);
- goto out;
}
switch (dpm_order) {
case DPM_ORDER_NONE:
@@ -1786,7 +1786,7 @@ int device_move(struct device *dev, struct device *new_parent,
device_pm_move_last(dev);
break;
}
-out_put:
+
put_device(old_parent);
out:
device_pm_unlock();
--
1.7.9.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-04-23 7:16 [PATCH RESEND] driver core: always handle dpm_order Linus Walleij
@ 2012-04-23 11:47 ` Rafael J. Wysocki
2012-04-23 15:43 ` Greg Kroah-Hartman
1 sibling, 0 replies; 9+ messages in thread
From: Rafael J. Wysocki @ 2012-04-23 11:47 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-kernel, Greg Kroah-Hartman, Rabin Vincent, Linus Walleij
On Monday, April 23, 2012, Linus Walleij wrote:
> From: Rabin Vincent <rabin.vincent@stericsson.com>
>
> If !dev->class, device_move() does not respect the dpm_order.
> Fix it to do so.
>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> [Fixed a small dangling label compile warning]
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/base/core.c | 36 ++++++++++++++++++------------------
> 1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index e28ce98..f428321 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1753,25 +1753,25 @@ int device_move(struct device *dev, struct device *new_parent,
> set_dev_node(dev, dev_to_node(new_parent));
> }
>
> - if (!dev->class)
> - goto out_put;
> - error = device_move_class_links(dev, old_parent, new_parent);
> - if (error) {
> - /* We ignore errors on cleanup since we're hosed anyway... */
> - device_move_class_links(dev, new_parent, old_parent);
> - if (!kobject_move(&dev->kobj, &old_parent->kobj)) {
> - if (new_parent)
> - klist_remove(&dev->p->knode_parent);
> - dev->parent = old_parent;
> - if (old_parent) {
> - klist_add_tail(&dev->p->knode_parent,
> - &old_parent->p->klist_children);
> - set_dev_node(dev, dev_to_node(old_parent));
> + if (dev->class) {
> + error = device_move_class_links(dev, old_parent, new_parent);
> + if (error) {
> + /* We ignore errors on cleanup since we're hosed anyway... */
> + device_move_class_links(dev, new_parent, old_parent);
> + if (!kobject_move(&dev->kobj, &old_parent->kobj)) {
> + if (new_parent)
> + klist_remove(&dev->p->knode_parent);
> + dev->parent = old_parent;
> + if (old_parent) {
> + klist_add_tail(&dev->p->knode_parent,
> + &old_parent->p->klist_children);
> + set_dev_node(dev, dev_to_node(old_parent));
> + }
> }
> + cleanup_glue_dir(dev, new_parent_kobj);
> + put_device(new_parent);
> + goto out;
> }
> - cleanup_glue_dir(dev, new_parent_kobj);
> - put_device(new_parent);
> - goto out;
> }
> switch (dpm_order) {
> case DPM_ORDER_NONE:
> @@ -1786,7 +1786,7 @@ int device_move(struct device *dev, struct device *new_parent,
> device_pm_move_last(dev);
> break;
> }
> -out_put:
> +
> put_device(old_parent);
> out:
> device_pm_unlock();
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-04-23 7:16 [PATCH RESEND] driver core: always handle dpm_order Linus Walleij
2012-04-23 11:47 ` Rafael J. Wysocki
@ 2012-04-23 15:43 ` Greg Kroah-Hartman
2012-04-24 12:11 ` Linus Walleij
1 sibling, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2012-04-23 15:43 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-kernel, Rafael J. Wysocki, Rabin Vincent, Linus Walleij
On Mon, Apr 23, 2012 at 09:16:36AM +0200, Linus Walleij wrote:
> From: Rabin Vincent <rabin.vincent@stericsson.com>
>
> If !dev->class, device_move() does not respect the dpm_order.
> Fix it to do so.
>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> [Fixed a small dangling label compile warning]
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/base/core.c | 36 ++++++++++++++++++------------------
> 1 file changed, 18 insertions(+), 18 deletions(-)
Is this a problem in 3.4? Older kernels? Or can it wait for 3.5?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-04-23 15:43 ` Greg Kroah-Hartman
@ 2012-04-24 12:11 ` Linus Walleij
2012-04-24 14:36 ` Greg Kroah-Hartman
0 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2012-04-24 12:11 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Linus Walleij, linux-kernel, Rafael J. Wysocki, Rabin Vincent
On Mon, Apr 23, 2012 at 5:43 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Mon, Apr 23, 2012 at 09:16:36AM +0200, Linus Walleij wrote:
>> From: Rabin Vincent <rabin.vincent@stericsson.com>
>>
>> If !dev->class, device_move() does not respect the dpm_order.
>> Fix it to do so.
>>
>> Cc: Rafael J. Wysocki <rjw@sisk.pl>
>> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
>> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
>> [Fixed a small dangling label compile warning]
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> drivers/base/core.c | 36 ++++++++++++++++++------------------
>> 1 file changed, 18 insertions(+), 18 deletions(-)
>
> Is this a problem in 3.4? Older kernels? Or can it wait for 3.5?
Rabin said earlier that it could wait for 3.4 atleast.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-04-24 12:11 ` Linus Walleij
@ 2012-04-24 14:36 ` Greg Kroah-Hartman
2012-05-28 6:38 ` Linus Walleij
0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2012-04-24 14:36 UTC (permalink / raw)
To: Linus Walleij
Cc: Linus Walleij, linux-kernel, Rafael J. Wysocki, Rabin Vincent
On Tue, Apr 24, 2012 at 02:11:09PM +0200, Linus Walleij wrote:
> On Mon, Apr 23, 2012 at 5:43 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Mon, Apr 23, 2012 at 09:16:36AM +0200, Linus Walleij wrote:
> >> From: Rabin Vincent <rabin.vincent@stericsson.com>
> >>
> >> If !dev->class, device_move() does not respect the dpm_order.
> >> Fix it to do so.
> >>
> >> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> >> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
> >> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> >> [Fixed a small dangling label compile warning]
> >> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> >> ---
> >> drivers/base/core.c | 36 ++++++++++++++++++------------------
> >> 1 file changed, 18 insertions(+), 18 deletions(-)
> >
> > Is this a problem in 3.4? Older kernels? Or can it wait for 3.5?
>
> Rabin said earlier that it could wait for 3.4 atleast.
That didn't answer my question at all. Oh well, 3.5 it is...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-04-24 14:36 ` Greg Kroah-Hartman
@ 2012-05-28 6:38 ` Linus Walleij
2012-05-28 7:14 ` Greg Kroah-Hartman
0 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2012-05-28 6:38 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Linus Walleij, linux-kernel, Rafael J. Wysocki, Rabin Vincent
On Tue, Apr 24, 2012 at 10:36 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Tue, Apr 24, 2012 at 02:11:09PM +0200, Linus Walleij wrote:
>> On Mon, Apr 23, 2012 at 5:43 PM, Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> wrote:
>> > On Mon, Apr 23, 2012 at 09:16:36AM +0200, Linus Walleij wrote:
>> >> From: Rabin Vincent <rabin.vincent@stericsson.com>
>> >>
>> >> If !dev->class, device_move() does not respect the dpm_order.
>> >> Fix it to do so.
>> >>
>> >> Cc: Rafael J. Wysocki <rjw@sisk.pl>
>> >> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
>> >> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
>> >> [Fixed a small dangling label compile warning]
>> >> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> >> ---
>> >> drivers/base/core.c | 36 ++++++++++++++++++------------------
>> >> 1 file changed, 18 insertions(+), 18 deletions(-)
>> >
>> > Is this a problem in 3.4? Older kernels? Or can it wait for 3.5?
>>
>> Rabin said earlier that it could wait for 3.4 atleast.
>
> That didn't answer my question at all. Oh well, 3.5 it is...
Is this going upstream in this merge window? I haven't seen it
in Torvalds' tree, but I guess it may be pending for a late
merge...?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-05-28 6:38 ` Linus Walleij
@ 2012-05-28 7:14 ` Greg Kroah-Hartman
2012-05-28 9:33 ` Linus Walleij
0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2012-05-28 7:14 UTC (permalink / raw)
To: Linus Walleij
Cc: Linus Walleij, linux-kernel, Rafael J. Wysocki, Rabin Vincent
On Mon, May 28, 2012 at 02:38:09PM +0800, Linus Walleij wrote:
> On Tue, Apr 24, 2012 at 10:36 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Tue, Apr 24, 2012 at 02:11:09PM +0200, Linus Walleij wrote:
> >> On Mon, Apr 23, 2012 at 5:43 PM, Greg Kroah-Hartman
> >> <gregkh@linuxfoundation.org> wrote:
> >> > On Mon, Apr 23, 2012 at 09:16:36AM +0200, Linus Walleij wrote:
> >> >> From: Rabin Vincent <rabin.vincent@stericsson.com>
> >> >>
> >> >> If !dev->class, device_move() does not respect the dpm_order.
> >> >> Fix it to do so.
> >> >>
> >> >> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> >> >> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
> >> >> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> >> >> [Fixed a small dangling label compile warning]
> >> >> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> >> >> ---
> >> >> drivers/base/core.c | 36 ++++++++++++++++++------------------
> >> >> 1 file changed, 18 insertions(+), 18 deletions(-)
> >> >
> >> > Is this a problem in 3.4? Older kernels? Or can it wait for 3.5?
> >>
> >> Rabin said earlier that it could wait for 3.4 atleast.
> >
> > That didn't answer my question at all. Oh well, 3.5 it is...
>
> Is this going upstream in this merge window? I haven't seen it
> in Torvalds' tree, but I guess it may be pending for a late
> merge...?
Nope, it missed 3.5 as no one ever answered my questions, so I guessed
that no one really cares about this :(
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-05-28 7:14 ` Greg Kroah-Hartman
@ 2012-05-28 9:33 ` Linus Walleij
2012-06-11 16:30 ` Linus Walleij
0 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2012-05-28 9:33 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Linus Walleij, linux-kernel, Rafael J. Wysocki, Rabin Vincent
On Mon, May 28, 2012 at 3:14 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Mon, May 28, 2012 at 02:38:09PM +0800, Linus Walleij wrote:
>> On Tue, Apr 24, 2012 at 10:36 PM, Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> wrote:
>> > That didn't answer my question at all. Oh well, 3.5 it is...
>>
>> Is this going upstream in this merge window? I haven't seen it
>> in Torvalds' tree, but I guess it may be pending for a late
>> merge...?
>
> Nope, it missed 3.5 as no one ever answered my questions, so I guessed
> that no one really cares about this :(
I care. Anyway, Rafael has ACK:ed it so please merge it as any
other patch for kernel 3.6.
If somebody wants to for CC @stable, speak up.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND] driver core: always handle dpm_order
2012-05-28 9:33 ` Linus Walleij
@ 2012-06-11 16:30 ` Linus Walleij
0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2012-06-11 16:30 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Linus Walleij, linux-kernel, Rafael J. Wysocki, Rabin Vincent
On Mon, May 28, 2012 at 11:33 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Mon, May 28, 2012 at 3:14 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>> On Mon, May 28, 2012 at 02:38:09PM +0800, Linus Walleij wrote:
>>> On Tue, Apr 24, 2012 at 10:36 PM, Greg Kroah-Hartman
>>> <gregkh@linuxfoundation.org> wrote:
>
>>> > That didn't answer my question at all. Oh well, 3.5 it is...
>>>
>>> Is this going upstream in this merge window? I haven't seen it
>>> in Torvalds' tree, but I guess it may be pending for a late
>>> merge...?
>>
>> Nope, it missed 3.5 as no one ever answered my questions, so I guessed
>> that no one really cares about this :(
>
> I care. Anyway, Rafael has ACK:ed it so please merge it as any
> other patch for kernel 3.6.
Just a friendly poke to queue this for testing in -next for the v3.6
merge window...
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-06-11 16:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 7:16 [PATCH RESEND] driver core: always handle dpm_order Linus Walleij
2012-04-23 11:47 ` Rafael J. Wysocki
2012-04-23 15:43 ` Greg Kroah-Hartman
2012-04-24 12:11 ` Linus Walleij
2012-04-24 14:36 ` Greg Kroah-Hartman
2012-05-28 6:38 ` Linus Walleij
2012-05-28 7:14 ` Greg Kroah-Hartman
2012-05-28 9:33 ` Linus Walleij
2012-06-11 16:30 ` Linus Walleij
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.