Re: [PATCH] driver core: Move device_links_purge() after bus_remove_device()

From: jeffy
Date: Wed Oct 18 2017 - 21:12:00 EST


Hi Rafael,

On 10/19/2017 07:36 AM, Rafael J. Wysocki wrote:
Why don't you write something like the following:

"The current ordering of code in device_del() triggers a WARN_ON()
in device_links_purge(), because of an unexpected link status.

The device_links_unbind_consumers() call in device_release_driver()
has to take place before device_links_purge() for the status of all
links to be correct, so move the device_links_purge() call in
device_del() after the invocation of bus_remove_device() which calls
device_release_driver()."

that looks much better, i'll use it and your signed-off, thanks :)