Skip to contentSkip to conversation

rcuclassic: fix compiler warning

PATCH In review Hiroshi Shimamoto 3 participants 4 messages Aug 18, 2008 – Aug 27, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcuclassic: fix compiler warning

From: Hiroshi Shimamoto <[email protected]>

CC kernel/rcuclassic.o
kernel/rcuclassic.c: In function 'rcu_init_percpu_data':
kernel/rcuclassic.c:705: warning: comparison of distinct pointer types lacks a cast kernel/rcuclassic.c:713: warning: comparison of distinct pointer types lacks a cast

flags should be unsigned long.

---
 kernel/rcuclassic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/rcuclassic.c +1 -1
index fb1f1cc..86ff6d6 100644
@@ -700,7 +700,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.5.6
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Hiroshi Shimamoto

From: Hiroshi Shimamoto <[email protected]>

CC kernel/rcuclassic.o
kernel/rcuclassic.c: In function 'rcu_init_percpu_data':
kernel/rcuclassic.c:705: warning: comparison of distinct pointer types lacks a cast kernel/rcuclassic.c:713: warning: comparison of distinct pointer types lacks a cast

flags should be unsigned long.

You beat me to it!

Quoted 21 lines
---
 kernel/rcuclassic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/rcuclassic.c +1 -1
index fb1f1cc..86ff6d6 100644
@@ -700,7 +700,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.5.6
#2 lore raw
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Hiroshi Shimamoto

From: Hiroshi Shimamoto <[email protected]>

CC kernel/rcuclassic.o
kernel/rcuclassic.c: In function 'rcu_init_percpu_data':
kernel/rcuclassic.c:705: warning: comparison of distinct pointer types lacks a cast kernel/rcuclassic.c:713: warning: comparison of distinct pointer types lacks a cast

Quoted 5 lines
Quoted 1 line

flags should be unsigned long.

You beat me to it!

Hi Ingo, could you please apply this?

thanks,
Hiroshi Shimamoto

#3 lore raw
Quoted 9 lines · Hiroshi Shimamoto
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Hiroshi Shimamoto

From: Hiroshi Shimamoto <[email protected]>

CC kernel/rcuclassic.o
kernel/rcuclassic.c: In function 'rcu_init_percpu_data':
kernel/rcuclassic.c:705: warning: comparison of distinct pointer types lacks a cast kernel/rcuclassic.c:713: warning: comparison of distinct pointer types lacks a cast

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

flags should be unsigned long.

You beat me to it!

Hi Ingo, could you please apply this?

hm, the fix got lost due to a revert+reapply - i've applied your fix now, thanks for keeping an eye on it.

Ingo