summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2004-07-28 09:10:19 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-28 09:10:19 -0700
commit3bf0aa6fde91a0dc87117919ef0b00fdcc5d0632 (patch)
tree07a1ee7e38ad10120a05e96f5e8f54ad8337674f /include
parent27c49d8c8f70d22a0ebf5a00487e6b5da176cade (diff)
[PATCH] hlist_for_each_safe cleanup
Make code for hlist_for_each_safe use better code (same as hlist_for_each_entry_safe). Get rid of comment about prefetch, because that was fixed a while ago. Only current use of this is in the bridge code, that I maintain. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/list.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 23e287fe4259..92127ae0e995 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -620,13 +620,12 @@ static inline void hlist_add_after(struct hlist_node *n,
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
-/* Cannot easily do prefetch unfortunately */
#define hlist_for_each(pos, head) \
for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \
pos = pos->next)
#define hlist_for_each_safe(pos, n, head) \
- for (pos = (head)->first; n = pos ? pos->next : NULL, pos; \
+ for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
pos = n)
/**