public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Removing 'pos' from hlist iterators
@ 2012-07-31 20:39 Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2012-07-31 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds

Hi all,

I was working on code that uses hlists, and noticed something odd.

While list_for_each_entry needs 3 parameters (type*, head, member), hlist_for_each_entry needs 4 (everything like hlist_for_each + 'pos').

pos and tpos both serve as iterators in this case, and I think that there's no real need for this redundancy.

Would it make sense removing 'pos' out of the hlist iterators to make it more list the list iterators? The downside I see here is that it'll cause a lot of one-line changes all across the code since there are quite a few call sites.


Thanks,
Sasha

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-31 20:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 20:39 Removing 'pos' from hlist iterators Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox