lkml.org 
[lkml]   [2011]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: RCU: how to suppress warnings from rcu_assign_pointer?
From
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 30 Jul 2011 14:17:05 +0200

> Le vendredi 29 juillet 2011 à 10:50 -0700, Stephen Hemminger a écrit :
>> Gcc now generates warnings from rcu_assign_pointer when passed the
>> address of something for example:
>> rcu_assign_pointer(dev_queue->qdisc, &noop_qdisc);
>> This warning is harmless and should be surpressed but there maybe
>> other cases where we want that Gcc warning.
>>
>> I tried various combinations of in rcu_assign_pointer macro
>> #pragma GCC diagnostic push
>> #pragma GCC diagnostic ignored "-Wlogical-op"
>> ...
>> #pragma GCC diagnostic pop
>> but macro's and pragma's don't nest with the correct scope for
>> this.
>>
>> Maybe some one with more Gcc foo and time to waste could take
>> a crack at it.
>
> I would just remove the test from rcu_assign_pointer().
>
> We now have RCU_INIT_POINTER() for places we dont want/afford the
> smp_wmb()

Agreed:

Acked-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-07-31 05:19    [W:0.094 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site