summaryrefslogtreecommitdiffstats
path: root/include/linux/rculist.h
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-03-26 13:27:08 +0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-27 12:58:04 -0700
commitf517700cce37ffcb36e7afae0294fd11c72ed134 (patch)
tree38e588d2dbf4a3bacf31263966fcbaf9d946c971 /include/linux/rculist.h
parent82072c4fcf095ce03a05860365c157c8bb58945b (diff)
downloadlinux-f517700cce37ffcb36e7afae0294fd11c72ed134.tar.gz
linux-f517700cce37ffcb36e7afae0294fd11c72ed134.tar.bz2
linux-f517700cce37ffcb36e7afae0294fd11c72ed134.zip
rculist: Fix another sparse warning
This fixes the following sparse warnings: make C=1 CF=-D__CHECK_ENDIAN__ net/tipc/name_table.o net/tipc/name_table.c:977:17: error: incompatible types in comparison expression (different address spaces) net/tipc/name_table.c:977:17: error: incompatible types in comparison expression (different address spaces) To silence these spare complaints, an RCU annotation should be added to "next" pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_from_rcu(). Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/rculist.h')
-rw-r--r--include/linux/rculist.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 665397247e82..17c6b1f84a77 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -549,8 +549,8 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n,
*/
#define hlist_for_each_entry_from_rcu(pos, member) \
for (; pos; \
- pos = hlist_entry_safe(rcu_dereference((pos)->member.next),\
- typeof(*(pos)), member))
+ pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
+ &(pos)->member)), typeof(*(pos)), member))
#endif /* __KERNEL__ */
#endif