Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30189651 authored by David Daney's avatar David Daney Committed by Ralf Baechle
Browse files

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: default avatarDavid Daney <david.daney@cavium.com>
Patchwork: http://patchwork.linux-mips.org/patch/4966/


Acked-by: default avatarJohn Crispin <blogic@openwrt.org>
parent 22478677
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
 */
void __mips_set_bit(unsigned long nr, volatile unsigned long *addr)
{
	volatile unsigned long *a = addr;
	unsigned long *a = (unsigned long *)addr;
	unsigned bit = nr & SZLONG_MASK;
	unsigned long mask;
	unsigned long flags;
@@ -41,7 +41,7 @@ EXPORT_SYMBOL(__mips_set_bit);
 */
void __mips_clear_bit(unsigned long nr, volatile unsigned long *addr)
{
	volatile unsigned long *a = addr;
	unsigned long *a = (unsigned long *)addr;
	unsigned bit = nr & SZLONG_MASK;
	unsigned long mask;
	unsigned long flags;
@@ -63,7 +63,7 @@ EXPORT_SYMBOL(__mips_clear_bit);
 */
void __mips_change_bit(unsigned long nr, volatile unsigned long *addr)
{
	volatile unsigned long *a = addr;
	unsigned long *a = (unsigned long *)addr;
	unsigned bit = nr & SZLONG_MASK;
	unsigned long mask;
	unsigned long flags;
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(__mips_change_bit);
int __mips_test_and_set_bit(unsigned long nr,
			    volatile unsigned long *addr)
{
	volatile unsigned long *a = addr;
	unsigned long *a = (unsigned long *)addr;
	unsigned bit = nr & SZLONG_MASK;
	unsigned long mask;
	unsigned long flags;
@@ -112,7 +112,7 @@ EXPORT_SYMBOL(__mips_test_and_set_bit);
int __mips_test_and_set_bit_lock(unsigned long nr,
				 volatile unsigned long *addr)
{
	volatile unsigned long *a = addr;
	unsigned long *a = (unsigned long *)addr;
	unsigned bit = nr & SZLONG_MASK;
	unsigned long mask;
	unsigned long flags;
@@ -137,7 +137,7 @@ EXPORT_SYMBOL(__mips_test_and_set_bit_lock);
 */
int __mips_test_and_clear_bit(unsigned long nr, volatile unsigned long *addr)
{
	volatile unsigned long *a = addr;
	unsigned long *a = (unsigned long *)addr;
	unsigned bit = nr & SZLONG_MASK;
	unsigned long mask;
	unsigned long flags;
@@ -162,7 +162,7 @@ EXPORT_SYMBOL(__mips_test_and_clear_bit);
 */
int __mips_test_and_change_bit(unsigned long nr, volatile unsigned long *addr)
{
	volatile unsigned long *a = addr;
	unsigned long *a = (unsigned long *)addr;
	unsigned bit = nr & SZLONG_MASK;
	unsigned long mask;
	unsigned long flags;