netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.37-rc2] Fix duplicate volatile warning.
@ 2010-11-18  4:03 Tetsuo Handa
  2010-11-18 17:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tetsuo Handa @ 2010-11-18  4:03 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev

Commit 0ed8ddf4 "neigh: Protect neigh->ha[] with a seqlock" made gcc 3.x
to warn

  include/net/neighbour.h: In function `neigh_event_send':
  include/net/neighbour.h:306: warning: duplicate `volatile'

.
----------------------------------------
>From a391f571f21bfa81369599f03e86fa75589291a3 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Thu, 18 Nov 2010 12:44:26 +0900
Subject: [PATCH 2.6.37-rc2] Fix duplicate volatile warning.

jiffies is defined as "volatile".

  extern unsigned long volatile __jiffy_data jiffies;

ACCESS_ONCE() uses "volatile".
As a result, some compilers warn duplicate `volatile' for ACCESS_ONCE(jiffies).

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 include/net/neighbour.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 55590ab..6beb1ff 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -303,7 +303,7 @@ static inline void neigh_confirm(struct neighbour *neigh)
 
 static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
 {
-	unsigned long now = ACCESS_ONCE(jiffies);
+	unsigned long now = jiffies;
 	
 	if (neigh->used != now)
 		neigh->used = now;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.37-rc2] Fix duplicate volatile warning.
  2010-11-18  4:03 [PATCH 2.6.37-rc2] Fix duplicate volatile warning Tetsuo Handa
@ 2010-11-18 17:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-18 17:40 UTC (permalink / raw)
  To: penguin-kernel; +Cc: eric.dumazet, netdev

From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Thu, 18 Nov 2010 13:03:19 +0900

>>From a391f571f21bfa81369599f03e86fa75589291a3 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Thu, 18 Nov 2010 12:44:26 +0900
> Subject: [PATCH 2.6.37-rc2] Fix duplicate volatile warning.
> 
> jiffies is defined as "volatile".
> 
>   extern unsigned long volatile __jiffy_data jiffies;
> 
> ACCESS_ONCE() uses "volatile".
> As a result, some compilers warn duplicate `volatile' for ACCESS_ONCE(jiffies).
> 
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

Fair enough, applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-18 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18  4:03 [PATCH 2.6.37-rc2] Fix duplicate volatile warning Tetsuo Handa
2010-11-18 17:40 ` David Miller

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).