[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120807025520.GA3823@leaf>
Date: Mon, 6 Aug 2012 19:55:20 -0700
From: Josh Triplett <josh@...htriplett.org>
To: Sasha Levin <levinsasha928@...il.com>
Cc: torvalds@...ux-foundation.org, tj@...nel.org,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, paul.gortmaker@...driver.com,
davem@...emloft.net, rostedt@...dmis.org, mingo@...e.hu,
ebiederm@...ssion.com, aarcange@...hat.com, ericvh@...il.com,
netdev@...r.kernel.org, eric.dumazet@...il.com,
mathieu.desnoyers@...icios.com
Subject: Re: [RFC v3 1/7] hashtable: introduce a small and naive hashtable
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
> + */
> +#define hash_add(hashtable, bits, node, key) \
> + hlist_add_head(node, &hashtable[hash_min(key, bits)]);
Any particular reason to make this a macro rather than a static inline?
Also, even if you do make it a macro, don't include the semicolon.
> +/**
> + * hash_for_each_possible - iterate over all possible objects for a giver key
s/giver/given/
> + * @name: hashtable to iterate
> + * @obj: the type * to use as a loop cursor for each bucke
s/bucke/bucket/
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists