Re: [RFC v3 1/7] hashtable: introduce a small and naive hashtable

2012-08-07 Thread Sasha Levin
On 08/07/2012 04:55 AM, Josh Triplett wrote: > On Tue, Aug 07, 2012 at 02:45:10AM +0200, Sasha Levin wrote: >> +/** >> + * hash_add - add an object to a hashtable >> + * @hashtable: hashtable to add to >> + * @bits: bit count used for hashing >> + * @node: the &struct hlist_node of the object to be

Re: [RFC v3 1/7] hashtable: introduce a small and naive hashtable

2012-08-06 Thread Josh Triplett
On Tue, Aug 07, 2012 at 02:45:10AM +0200, Sasha Levin wrote: > +/** > + * hash_add - add an object to a hashtable > + * @hashtable: hashtable to add to > + * @bits: bit count used for hashing > + * @node: the &struct hlist_node of the object to be added > + * @key: the key of the object to be added

Re: [RFC v3 1/7] hashtable: introduce a small and naive hashtable

2012-08-06 Thread Sasha Levin
On 08/07/2012 03:48 AM, Li Wei wrote: > On 08/07/2012 08:45 AM, Sasha Levin wrote: >> +/** >> + * hash_for_each - iterate over a hashtable >> + * @name: hashtable to iterate >> + * @bits: bit count of hashing function of the hashtable >> + * @bkt: integer to use as bucket loop cursor >> + * @node:

Re: [RFC v3 1/7] hashtable: introduce a small and naive hashtable

2012-08-06 Thread Li Wei
On 08/07/2012 08:45 AM, Sasha Levin wrote: > This hashtable implementation is using hlist buckets to provide a simple > hashtable to prevent it from getting reimplemented all over the kernel. > > Signed-off-by: Sasha Levin > --- > include/linux/hashtable.h | 82 > +

Re: [RFC v3 1/7] hashtable: introduce a small and naive hashtable

2012-08-06 Thread Joe Perches
On Tue, 2012-08-07 at 02:45 +0200, Sasha Levin wrote: > This hashtable implementation is using hlist buckets to provide a simple > hashtable to prevent it from getting reimplemented all over the kernel. > diff --git a/include/linux/hashtable.h b/include/linux/hashtable.h Just trivial style notes

[RFC v3 1/7] hashtable: introduce a small and naive hashtable

2012-08-06 Thread Sasha Levin
This hashtable implementation is using hlist buckets to provide a simple hashtable to prevent it from getting reimplemented all over the kernel. Signed-off-by: Sasha Levin --- include/linux/hashtable.h | 82 + 1 files changed, 82 insertions(+), 0 del