Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-07 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 05:13:24PM +0100, Thierry Reding wrote: > On Thu, Nov 06, 2014 at 11:25:32AM +0100, Thierry Reding wrote: > > On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: > [...] > > > Sure, document it better if you want, but I think something needs to be > > > done

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-07 Thread Andrzej Hajda
On 11/06/2014 10:48 AM, Thierry Reding wrote: > On Wed, Nov 05, 2014 at 05:00:47PM +0100, Andrzej Hajda wrote: >> On 11/05/2014 03:04 PM, Thierry Reding wrote: >>> On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: On 11/04/2014 05:29 PM, Thierry Reding wrote: > From: Thierry

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-07 Thread Andrzej Hajda
On 11/06/2014 10:48 AM, Thierry Reding wrote: On Wed, Nov 05, 2014 at 05:00:47PM +0100, Andrzej Hajda wrote: On 11/05/2014 03:04 PM, Thierry Reding wrote: On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: On 11/04/2014 05:29 PM, Thierry Reding wrote: From: Thierry Reding

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-07 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 05:13:24PM +0100, Thierry Reding wrote: On Thu, Nov 06, 2014 at 11:25:32AM +0100, Thierry Reding wrote: On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: [...] Sure, document it better if you want, but I think something needs to be done

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Thu, Nov 06, 2014 at 11:25:32AM +0100, Thierry Reding wrote: > On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: [...] > > Sure, document it better if you want, but I think something needs to be > > done differently if at all possible. > > try_module_get() is the only way I

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: > On Wed, Nov 05, 2014 at 10:13:53AM +0100, Thierry Reding wrote: > > On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: > > > On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: > > [...] > > > > diff

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Wed, Nov 05, 2014 at 05:00:47PM +0100, Andrzej Hajda wrote: > On 11/05/2014 03:04 PM, Thierry Reding wrote: > > On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: > >> On 11/04/2014 05:29 PM, Thierry Reding wrote: > >>> From: Thierry Reding > >>> > >>> Add a generic implementation

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Thu, Nov 06, 2014 at 11:25:32AM +0100, Thierry Reding wrote: On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: [...] Sure, document it better if you want, but I think something needs to be done differently if at all possible. try_module_get() is the only way I know of

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Wed, Nov 05, 2014 at 05:00:47PM +0100, Andrzej Hajda wrote: On 11/05/2014 03:04 PM, Thierry Reding wrote: On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: On 11/04/2014 05:29 PM, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com Add a generic implementation

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-06 Thread Thierry Reding
On Wed, Nov 05, 2014 at 06:18:15PM -0800, Greg Kroah-Hartman wrote: On Wed, Nov 05, 2014 at 10:13:53AM +0100, Thierry Reding wrote: On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: [...] diff --git

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Greg Kroah-Hartman
On Wed, Nov 05, 2014 at 10:13:53AM +0100, Thierry Reding wrote: > On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: > > On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: > [...] > > > diff --git a/drivers/base/registry.c b/drivers/base/registry.c > [...] > > > +/**

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Andrzej Hajda
On 11/05/2014 03:04 PM, Thierry Reding wrote: > On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: >> On 11/04/2014 05:29 PM, Thierry Reding wrote: >>> From: Thierry Reding >>> >>> Add a generic implementation of an object registry. This targets drivers >>> and subsystems that provide

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Thierry Reding
On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: > On 11/04/2014 05:29 PM, Thierry Reding wrote: > > From: Thierry Reding > > > > Add a generic implementation of an object registry. This targets drivers > > and subsystems that provide auxiliary objects that other drivers need to >

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Andrzej Hajda
On 11/04/2014 05:29 PM, Thierry Reding wrote: > From: Thierry Reding > > Add a generic implementation of an object registry. This targets drivers > and subsystems that provide auxiliary objects that other drivers need to > look up. The goal is to put the difficult parts (keep object references,

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Thierry Reding
On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: > On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: [...] > > diff --git a/drivers/base/registry.c b/drivers/base/registry.c [...] > > +/** > > + * registry_record_ref - reference on the registry record > > + *

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Thierry Reding
On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: [...] diff --git a/drivers/base/registry.c b/drivers/base/registry.c [...] +/** + * registry_record_ref - reference on the registry record + * @record:

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Andrzej Hajda
On 11/04/2014 05:29 PM, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com Add a generic implementation of an object registry. This targets drivers and subsystems that provide auxiliary objects that other drivers need to look up. The goal is to put the difficult parts (keep object

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Thierry Reding
On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: On 11/04/2014 05:29 PM, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com Add a generic implementation of an object registry. This targets drivers and subsystems that provide auxiliary objects that other drivers

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Andrzej Hajda
On 11/05/2014 03:04 PM, Thierry Reding wrote: On Wed, Nov 05, 2014 at 01:36:24PM +0100, Andrzej Hajda wrote: On 11/04/2014 05:29 PM, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com Add a generic implementation of an object registry. This targets drivers and subsystems that

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-05 Thread Greg Kroah-Hartman
On Wed, Nov 05, 2014 at 10:13:53AM +0100, Thierry Reding wrote: On Tue, Nov 04, 2014 at 08:38:45AM -0800, Greg Kroah-Hartman wrote: On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: [...] diff --git a/drivers/base/registry.c b/drivers/base/registry.c [...] +/** + *

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-04 Thread Greg Kroah-Hartman
On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: > From: Thierry Reding > > Add a generic implementation of an object registry. This targets drivers > and subsystems that provide auxiliary objects that other drivers need to > look up. The goal is to put the difficult parts (keep

[RFC 1/2] core: Add generic object registry implementation

2014-11-04 Thread Thierry Reding
From: Thierry Reding Add a generic implementation of an object registry. This targets drivers and subsystems that provide auxiliary objects that other drivers need to look up. The goal is to put the difficult parts (keep object references, module usage count, ...) into core code so that

[RFC 1/2] core: Add generic object registry implementation

2014-11-04 Thread Thierry Reding
From: Thierry Reding tred...@nvidia.com Add a generic implementation of an object registry. This targets drivers and subsystems that provide auxiliary objects that other drivers need to look up. The goal is to put the difficult parts (keep object references, module usage count, ...) into core

Re: [RFC 1/2] core: Add generic object registry implementation

2014-11-04 Thread Greg Kroah-Hartman
On Tue, Nov 04, 2014 at 05:29:27PM +0100, Thierry Reding wrote: From: Thierry Reding tred...@nvidia.com Add a generic implementation of an object registry. This targets drivers and subsystems that provide auxiliary objects that other drivers need to look up. The goal is to put the difficult