Skip to contentSkip to conversation

rcu: spinlocks take an unsigned long flags

PATCH In review Harvey Harrison 2 participants 4 messages Aug 26, 2008

lore
Share & tools
lore
#0 lore raw

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

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

---
 kernel/rcuclassic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/rcuclassic.c +1 -1
index 3f69189..743cf05 100644
@@ -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));
Signature · 1 line
1.6.0.340.g84854
#1 lore raw
Quoted 6 lines · Harvey Harrison

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

This is a duplicate of http://lkml.org/lkml/2008/8/18/497, sent in by Hiroshi Shimamoto <[email protected]>.

Thanx, Paul

Quoted 22 lines
---
 kernel/rcuclassic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/rcuclassic.c +1 -1
index 3f69189..743cf05 100644
@@ -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));
Signature · 1 line
1.6.0.340.g84854
#2 lore raw
Quoted 11 lines · Paul E. McKenney
Quoted 6 lines · Harvey Harrison

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

This is a duplicate of http://lkml.org/lkml/2008/8/18/497, sent in by Hiroshi Shimamoto <[email protected]>.

Ok, what tree is it going in through, this was from today's linux-next.

Harvey

#3 lore raw
Quoted 9 lines · Harvey Harrison
Quoted 8 lines · Paul E. McKenney
Quoted 6 lines · Harvey Harrison

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

Quoted 5 lines
Quoted 3 lines

This is a duplicate of http://lkml.org/lkml/2008/8/18/497, sent in by Hiroshi Shimamoto <[email protected]>.

Ok, what tree is it going in through, this was from today's linux-next.

Good question -- my guess would be tip/core/rcu, but either way, it should be added somewhere. ;-)

Thanx, Paul