diff options
author | David Daney <david.daney@cavium.com> | 2013-02-26 17:22:33 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-07 19:19:06 -0400 |
commit | 301896513971d41d737c904ecf267b6f0ea21d55 (patch) | |
tree | 482c2508e7db52d399fe3ef9248fa3b295c11394 /arch | |
parent | 224786779d04bbcd5f61eaafc86bf8fee350388a (diff) |
MIPS: Remove unneeded volatile from arch/mips/lib/bitops.c
The operations on the bitmap pointers are protected by "memory"
clobbering raw_local_irq_{save,restore}(), so there is no need for
volatile here. By removing the volatile we get better code generation
out of the compiler.
Signed-off-by: David Daney <david.daney@cavium.com>
Patchwork: http://patchwork.linux-mips.org/patch/4966/
Acked-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/lib/bitops.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/lib/bitops.c b/arch/mips/lib/bitops.c index a64daee740ee..3b2a1e78a543 100644 --- a/arch/mips/lib/bitops.c +++ b/arch/mips/lib/bitops.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | void __mips_set_bit(unsigned long nr, volatile unsigned long *addr) | 20 | void __mips_set_bit(unsigned long nr, volatile unsigned long *addr) |
21 | { | 21 | { |
22 | volatile unsigned long *a = addr; | 22 | unsigned long *a = (unsigned long *)addr; |
23 | unsigned bit = nr & SZLONG_MASK; | 23 | unsigned bit = nr & SZLONG_MASK; |
24 | unsigned long mask; | 24 | unsigned long mask; |
25 | unsigned long flags; | 25 | unsigned long flags; |
@@ -41,7 +41,7 @@ EXPORT_SYMBOL(__mips_set_bit); | |||
41 | */ | 41 | */ |
42 | void __mips_clear_bit(unsigned long nr, volatile unsigned long *addr) | 42 | void __mips_clear_bit(unsigned long nr, volatile unsigned long *addr) |
43 | { | 43 | { |
44 | volatile unsigned long *a = addr; | 44 | unsigned long *a = (unsigned long *)addr; |
45 | unsigned bit = nr & SZLONG_MASK; | 45 | unsigned bit = nr & SZLONG_MASK; |
46 | unsigned long mask; | 46 | unsigned long mask; |
47 | unsigned long flags; | 47 | unsigned long flags; |
@@ -63,7 +63,7 @@ EXPORT_SYMBOL(__mips_clear_bit); | |||
63 | */ | 63 | */ |
64 | void __mips_change_bit(unsigned long nr, volatile unsigned long *addr) | 64 | void __mips_change_bit(unsigned long nr, volatile unsigned long *addr) |
65 | { | 65 | { |
66 | volatile unsigned long *a = addr; | 66 | unsigned long *a = (unsigned long *)addr; |
67 | unsigned bit = nr & SZLONG_MASK; | 67 | unsigned bit = nr & SZLONG_MASK; |
68 | unsigned long mask; | 68 | unsigned long mask; |
69 | unsigned long flags; | 69 | unsigned long flags; |
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(__mips_change_bit); | |||
86 | int __mips_test_and_set_bit(unsigned long nr, | 86 | int __mips_test_and_set_bit(unsigned long nr, |
87 | volatile unsigned long *addr) | 87 | volatile unsigned long *addr) |
88 | { | 88 | { |
89 | volatile unsigned long *a = addr; | 89 | unsigned long *a = (unsigned long *)addr; |
90 | unsigned bit = nr & SZLONG_MASK; | 90 | unsigned bit = nr & SZLONG_MASK; |
91 | unsigned long mask; | 91 | unsigned long mask; |
92 | unsigned long flags; | 92 | unsigned long flags; |
@@ -112,7 +112,7 @@ EXPORT_SYMBOL(__mips_test_and_set_bit); | |||
112 | int __mips_test_and_set_bit_lock(unsigned long nr, | 112 | int __mips_test_and_set_bit_lock(unsigned long nr, |
113 | volatile unsigned long *addr) | 113 | volatile unsigned long *addr) |
114 | { | 114 | { |
115 | volatile unsigned long *a = addr; | 115 | unsigned long *a = (unsigned long *)addr; |
116 | unsigned bit = nr & SZLONG_MASK; | 116 | unsigned bit = nr & SZLONG_MASK; |
117 | unsigned long mask; | 117 | unsigned long mask; |
118 | unsigned long flags; | 118 | unsigned long flags; |
@@ -137,7 +137,7 @@ EXPORT_SYMBOL(__mips_test_and_set_bit_lock); | |||
137 | */ | 137 | */ |
138 | int __mips_test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) | 138 | int __mips_test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) |
139 | { | 139 | { |
140 | volatile unsigned long *a = addr; | 140 | unsigned long *a = (unsigned long *)addr; |
141 | unsigned bit = nr & SZLONG_MASK; | 141 | unsigned bit = nr & SZLONG_MASK; |
142 | unsigned long mask; | 142 | unsigned long mask; |
143 | unsigned long flags; | 143 | unsigned long flags; |
@@ -162,7 +162,7 @@ EXPORT_SYMBOL(__mips_test_and_clear_bit); | |||
162 | */ | 162 | */ |
163 | int __mips_test_and_change_bit(unsigned long nr, volatile unsigned long *addr) | 163 | int __mips_test_and_change_bit(unsigned long nr, volatile unsigned long *addr) |
164 | { | 164 | { |
165 | volatile unsigned long *a = addr; | 165 | unsigned long *a = (unsigned long *)addr; |
166 | unsigned bit = nr & SZLONG_MASK; | 166 | unsigned bit = nr & SZLONG_MASK; |
167 | unsigned long mask; | 167 | unsigned long mask; |
168 | unsigned long flags; | 168 | unsigned long flags; |