call_rcu: per_cpu_call_rcu_data should be non-const
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 29 Jun 2011 17:29:38 +0000 (13:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 29 Jun 2011 17:29:38 +0000 (13:29 -0400)
On FreeBSD:

In file included from urcu.c:438:
urcu-call-rcu-impl.h: In function 'get_cpu_call_rcu_data_mb':
urcu-call-rcu-impl.h:325: warning: return discards qualifiers from pointer target type

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-call-rcu-impl.h

index d5baa69685387808044529f634a69157ca9126c0..b9e57cd60a2ba731a2030cd36c9b9b6c211c416e 100644 (file)
@@ -115,7 +115,12 @@ static void alloc_cpu_call_rcu_data(void)
 
 #else /* #if defined(HAVE_SCHED_GETCPU) && defined(HAVE_SYSCONF) */
 
-static const struct call_rcu_data **per_cpu_call_rcu_data = NULL;
+/*
+ * per_cpu_call_rcu_data should be constant, but some functions below, used both
+ * for cases where cpu number is available and not available, assume it it not
+ * constant.
+ */
+static struct call_rcu_data **per_cpu_call_rcu_data = NULL;
 static const long maxcpus = -1;
 
 static void alloc_cpu_call_rcu_data(void)
This page took 0.027836 seconds and 4 git commands to generate.