[PATCH 1/2] rcu: spinlocks take an unsigned long flags

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Harvey Harrison
Date: Tuesday, August 26, 2008 - 1:00 pm

Noticed by sparse:
kernel/rcuclassic.c:719:2: error: incompatible types in comparison expression (different signedness)
kernel/rcuclassic.c:727:2: error: incompatible types in comparison expression (different signedness)
kernel/rcuclassic.c: In function ‘rcu_init_percpu_data’:
kernel/rcuclassic.c:719: warning: comparison of distinct pointer types lacks a cast
kernel/rcuclassic.c:727: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 kernel/rcuclassic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/rcuclassic.c b/kernel/rcuclassic.c
index 3f69189..743cf05 100644
--- a/kernel/rcuclassic.c
+++ b/kernel/rcuclassic.c
@@ -714,7 +714,7 @@ void rcu_check_callbacks(int cpu, int user)
 static void rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp,
 						struct rcu_data *rdp)
 {
-	long flags;
+	unsigned long flags;
 
 	spin_lock_irqsave(&rcp->lock, flags);
 	memset(rdp, 0, sizeof(*rdp));
-- 
1.6.0.340.g84854


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] rcu: spinlocks take an unsigned long flags, Harvey Harrison, (Tue Aug 26, 1:00 pm)
Re: [PATCH 1/2] rcu: spinlocks take an unsigned long flags, Paul E. McKenney, (Tue Aug 26, 1:45 pm)
Re: [PATCH 1/2] rcu: spinlocks take an unsigned long flags, Harvey Harrison, (Tue Aug 26, 1:52 pm)
Re: [PATCH 1/2] rcu: spinlocks take an unsigned long flags, Paul E. McKenney, (Tue Aug 26, 2:43 pm)