Skip to content
  • Ying Xue's avatar
    rculist: Fix sparse warning · f520c98e
    Ying Xue authored
    
    
    This fixes the following sparse warnings:
    
    make C=1 CF=-D__CHECK_ENDIAN__ net/ipv6/addrconf.o
    net/ipv6/addrconf.c:3495:9: error: incompatible types in comparison expression (different address spaces)
    net/ipv6/addrconf.c:3495:9: error: incompatible types in comparison expression (different address spaces)
    net/ipv6/addrconf.c:3495:9: error: incompatible types in comparison expression (different address spaces)
    net/ipv6/addrconf.c:3495:9: 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_continue_rcu_bh().
    
    By the way, this commit also resolves the same error appearing in
    hlist_for_each_entry_continue_rcu().
    
    Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    f520c98e