netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ying Xue <ying.xue@windriver.com>
To: <paulmck@linux.vnet.ibm.com>
Cc: <davem@davemloft.net>, <eric.dumazet@gmail.com>,
	<jon.maloy@ericsson.com>, <erik.hugne@ericsson.com>,
	<netdev@vger.kernel.org>, <kbuild-all@01.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next RESEND 2/2] ipv6: fix sparse warning
Date: Thu, 11 Dec 2014 09:56:33 +0800	[thread overview]
Message-ID: <5488F9D1.9060109@windriver.com> (raw)
In-Reply-To: <20141210160406.GS25340@linux.vnet.ibm.com>

On 12/11/2014 12:04 AM, Paul E. McKenney wrote:
> On Wed, Dec 10, 2014 at 04:46:07PM +0800, Ying Xue wrote:
>> This fixes the following spare warning when using
>>
>> 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 above spare complaint, 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: Ying Xue <ying.xue@windriver.com>
> 
> If you pull the rculist.h changes from the first patch into this one,
> I will queue it up through -rcu.
> 

Please just queue this patch into your RCU tree. Some changes of the
first patch currently only exists in net-next tree, so it cannot be
merged into RCU tree now. Therefore, please temporarily ignore it. In
next 3.19 development cycle, I will resubmit it to you.

Thanks,
Ying

> 							Thanx, Paul
> 
>> ---
>>  include/linux/rculist.h |   16 ++++++++--------
>>  1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/include/linux/rculist.h b/include/linux/rculist.h
>> index 866d9c9..32bd4ad 100644
>> --- a/include/linux/rculist.h
>> +++ b/include/linux/rculist.h
>> @@ -524,11 +524,11 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n,
>>   * @member:	the name of the hlist_node within the struct.
>>   */
>>  #define hlist_for_each_entry_continue_rcu(pos, member)			\
>> -	for (pos = hlist_entry_safe(rcu_dereference((pos)->member.next),\
>> -			typeof(*(pos)), member);			\
>> +	for (pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
>> +			&(pos)->member)), typeof(*(pos)), member);	\
>>  	     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))
>>
>>  /**
>>   * hlist_for_each_entry_continue_rcu_bh - iterate over a hlist continuing after current point
>> @@ -536,11 +536,11 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n,
>>   * @member:	the name of the hlist_node within the struct.
>>   */
>>  #define hlist_for_each_entry_continue_rcu_bh(pos, member)		\
>> -	for (pos = hlist_entry_safe(rcu_dereference_bh((pos)->member.next),\
>> -			typeof(*(pos)), member);			\
>> +	for (pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu(  \
>> +			&(pos)->member)), typeof(*(pos)), member);	\
>>  	     pos;							\
>> -	     pos = hlist_entry_safe(rcu_dereference_bh((pos)->member.next),\
>> -			typeof(*(pos)), member))
>> +	     pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu(	\
>> +			&(pos)->member)), typeof(*(pos)), member))
>>
>>  /**
>>   * hlist_for_each_entry_from_rcu - iterate over a hlist continuing from current point
>> -- 
>> 1.7.9.5
>>
> 
> 
> 

  reply	other threads:[~2014-12-11  1:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10  8:46 [PATCH net-next RESEND 0/2] fix rculist sparse errors Ying Xue
2014-12-10  8:46 ` [PATCH net-next RESEND 1/2] tipc: fix RCU sparse error Ying Xue
2014-12-10  8:46 ` [PATCH net-next RESEND 2/2] ipv6: fix sparse warning Ying Xue
2014-12-10 16:04   ` Paul E. McKenney
2014-12-11  1:56     ` Ying Xue [this message]
2014-12-11 17:02       ` Paul E. McKenney
2014-12-10 18:49 ` [PATCH net-next RESEND 0/2] fix rculist sparse errors David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5488F9D1.9060109@windriver.com \
    --to=ying.xue@windriver.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=erik.hugne@ericsson.com \
    --cc=jon.maloy@ericsson.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).