Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

locking/atomics/openrisc: Don't pull in all of <linux/bitops.h> in <asm/cmpxchg.h>

The openrisc implementation of <asm/cmpxchg.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-5-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Will Deacon and committed by
Ingo Molnar
b22d73c2 8bd9cb51

+2 -1
+2 -1
arch/openrisc/include/asm/cmpxchg.h
··· 16 16 #ifndef __ASM_OPENRISC_CMPXCHG_H 17 17 #define __ASM_OPENRISC_CMPXCHG_H 18 18 19 + #include <linux/bits.h> 20 + #include <linux/compiler.h> 19 21 #include <linux/types.h> 20 - #include <linux/bitops.h> 21 22 22 23 #define __HAVE_ARCH_CMPXCHG 1 23 24