Re: [PATCH 2/3] drivers/base: reorder consumer and its children behind suppliers

2018-06-28 Thread Pingfan Liu
On Wed, Jun 27, 2018 at 4:35 PM Dan Carpenter wrote: > > On Wed, Jun 27, 2018 at 10:34:54AM +0800, Pingfan Liu wrote: > > > 1b2a1e63 Pingfan Liu 2018-06-25 243} > > > 1b2a1e63 Pingfan Liu 2018-06-25 244} > > > 1b2a1e63 Pingfan Liu 2018-06-25 @245BUG_ON(!ret); > > > > > > If

Re: [PATCH 2/3] drivers/base: reorder consumer and its children behind suppliers

2018-06-27 Thread Dan Carpenter
On Wed, Jun 27, 2018 at 10:34:54AM +0800, Pingfan Liu wrote: > > 1b2a1e63 Pingfan Liu 2018-06-25 243} > > 1b2a1e63 Pingfan Liu 2018-06-25 244} > > 1b2a1e63 Pingfan Liu 2018-06-25 @245BUG_ON(!ret); > > > > If the list is empty then "ret" can be unitialized. We test a

Re: [PATCH 2/3] drivers/base: reorder consumer and its children behind suppliers

2018-06-26 Thread Pingfan Liu
Hi Dan, Thanks for your hints, see the comment in lines. On Tue, Jun 26, 2018 at 3:44 PM Dan Carpenter wrote: > > [ There is a bug with kbuild where it's not showing the Smatch warnings > but I can probably guess... - dan ] > > Hi Pingfan, > > Thank you for the patch! Perhaps something to

Re: [PATCH 2/3] drivers/base: reorder consumer and its children behind suppliers

2018-06-26 Thread Dan Carpenter
[ There is a bug with kbuild where it's not showing the Smatch warnings but I can probably guess... - dan ] Hi Pingfan, Thank you for the patch! Perhaps something to improve: url:

[PATCH 2/3] drivers/base: reorder consumer and its children behind suppliers

2018-06-24 Thread Pingfan Liu
commit 52cdbdd49853 ("driver core: correct device's shutdown order") introduces supplier<-consumer order in devices_kset. The commit tries to cleverly maintain both parent<-child and supplier<-consumer order by reordering a device when probing. This method makes things simple and clean, but