Re: [RFC v1 05/14] bus1: util - pool utility library

2016-10-27 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 09:18:01PM +0200, David Herrmann wrote: All small nits.. > +void bus1_pool_deinit(struct bus1_pool *pool) > +{ > + struct bus1_pool_slice *slice; > + > + if (!pool || !pool->f) > + return; > + > + while ((slice = list_first_entry_or_null(&pool->slic

Re: [RFC v1 05/14] bus1: util - pool utility library

2016-10-27 Thread Peter Zijlstra
On Thu, Oct 27, 2016 at 02:59:07PM +0200, Peter Zijlstra wrote: > On Wed, Oct 26, 2016 at 09:18:01PM +0200, David Herrmann wrote: > > +/* insert slice into the free tree */ > > +static void bus1_pool_slice_link_free(struct bus1_pool_slice *slice, > > + struct bus1_po

Re: [RFC v1 05/14] bus1: util - pool utility library

2016-10-27 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 09:18:01PM +0200, David Herrmann wrote: > +static struct bus1_pool_slice * > +bus1_pool_slice_free(struct bus1_pool_slice *slice) > +{ > + if (!slice) > + return NULL; > + > + kfree(slice); > + > + return NULL; > +} The return value is never used. Wh

Re: [RFC v1 05/14] bus1: util - pool utility library

2016-10-27 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 09:18:01PM +0200, David Herrmann wrote: > +/* insert slice into the free tree */ > +static void bus1_pool_slice_link_free(struct bus1_pool_slice *slice, > + struct bus1_pool *pool) > +{ > + struct rb_node **n, *prev = NULL; > + struc