Commit 3ab61eb9fd751336d1b3ad50ec7704bd3b62213f
Committed by
Linus Torvalds
1 parent
7a2e8a8faa
Exists in
master
and in
7 other branches
h8300: IRQ flags should be stored in an unsigned long
Fix h8300's asm/atomic.h to store the IRQ flags in an unsigned long to deal with warnings of the following type: arch/h8300/include/asm/atomic.h: In function 'atomic_add_return': arch/h8300/include/asm/atomic.h:22: warning: comparison of distinct pointer types lacks a cast arch/h8300/include/asm/atomic.h:24: warning: comparison of distinct pointer types lacks a cast Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 10 additions and 5 deletions Side-by-side Diff
arch/h8300/include/asm/atomic.h
... | ... | @@ -18,7 +18,8 @@ |
18 | 18 | |
19 | 19 | static __inline__ int atomic_add_return(int i, atomic_t *v) |
20 | 20 | { |
21 | - int ret,flags; | |
21 | + unsigned long flags; | |
22 | + int ret; | |
22 | 23 | local_irq_save(flags); |
23 | 24 | ret = v->counter += i; |
24 | 25 | local_irq_restore(flags); |
... | ... | @@ -30,7 +31,8 @@ |
30 | 31 | |
31 | 32 | static __inline__ int atomic_sub_return(int i, atomic_t *v) |
32 | 33 | { |
33 | - int ret,flags; | |
34 | + unsigned long flags; | |
35 | + int ret; | |
34 | 36 | local_irq_save(flags); |
35 | 37 | ret = v->counter -= i; |
36 | 38 | local_irq_restore(flags); |
... | ... | @@ -42,7 +44,8 @@ |
42 | 44 | |
43 | 45 | static __inline__ int atomic_inc_return(atomic_t *v) |
44 | 46 | { |
45 | - int ret,flags; | |
47 | + unsigned long flags; | |
48 | + int ret; | |
46 | 49 | local_irq_save(flags); |
47 | 50 | v->counter++; |
48 | 51 | ret = v->counter; |
... | ... | @@ -64,7 +67,8 @@ |
64 | 67 | |
65 | 68 | static __inline__ int atomic_dec_return(atomic_t *v) |
66 | 69 | { |
67 | - int ret,flags; | |
70 | + unsigned long flags; | |
71 | + int ret; | |
68 | 72 | local_irq_save(flags); |
69 | 73 | --v->counter; |
70 | 74 | ret = v->counter; |
... | ... | @@ -76,7 +80,8 @@ |
76 | 80 | |
77 | 81 | static __inline__ int atomic_dec_and_test(atomic_t *v) |
78 | 82 | { |
79 | - int ret,flags; | |
83 | + unsigned long flags; | |
84 | + int ret; | |
80 | 85 | local_irq_save(flags); |
81 | 86 | --v->counter; |
82 | 87 | ret = v->counter; |