Skip to content

Commit

Permalink
locking/atomics/sh: Don't pull in all of <linux/bitops.h> in <asm/cmp…
Browse files Browse the repository at this point in the history
…xchg-xchg.h>

The sh implementation of <asm/cmpxchg-xchg.h> pulls in <linux/bitops.h>
so that it can refer to BITS_PER_BYTE. It also transitively relies on
this pulling in <linux/compiler.h> for READ_ONCE().

Replace the #include with <linux/bits.h> and <linux/compiler.h>.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: yamada.masahiro@socionext.com
Link: https://lore.kernel.org/lkml/1529412794-17720-6-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Will Deacon authored and Ingo Molnar committed Jun 21, 2018
1 parent b22d73c commit 1c2672b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/sh/include/asm/cmpxchg-xchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
* This work is licensed under the terms of the GNU GPL, version 2. See the
* file "COPYING" in the main directory of this archive for more details.
*/
#include <linux/bitops.h>
#include <linux/bits.h>
#include <linux/compiler.h>
#include <asm/byteorder.h>

/*
Expand Down

0 comments on commit 1c2672b

Please sign in to comment.