[PATCH 29/38] Make asm-generic/cmpxchg.h #includeasm-generic/cmpxchg-local.h [ver #3]

From: David Howells
Date: Thu Mar 15 2012 - 17:03:15 EST


Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h as all arch
files that #include the former also #include the latter. See:

grep -rl asm-generic/cmpxchg-local[.]h arch/ | sort > b
grep -rl asm-generic/cmpxchg[.]h arch/ | sort > a
comm a b

This simplifies the disintegration of asm-generic/system.h for arches that
don't have their own.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
---

include/asm-generic/atomic.h | 2 ++
include/asm-generic/cmpxchg.h | 2 ++
include/asm-generic/system.h | 1 -
3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
index e37963c..8b8cf94 100644
--- a/include/asm-generic/atomic.h
+++ b/include/asm-generic/atomic.h
@@ -15,6 +15,8 @@
#ifndef __ASM_GENERIC_ATOMIC_H
#define __ASM_GENERIC_ATOMIC_H

+#include <asm/cmpxchg.h>
+
#ifdef CONFIG_SMP
/* Force people to define core atomics */
# if !defined(atomic_add_return) || !defined(atomic_sub_return) || \
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h
index 213ac6e..e0449af 100644
--- a/include/asm-generic/cmpxchg.h
+++ b/include/asm-generic/cmpxchg.h
@@ -10,6 +10,8 @@
#error "Cannot use generic cmpxchg on SMP"
#endif

+#include <asm-generic/cmpxchg-local.h>
+
/*
* Atomic compare and exchange.
*
diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h
index 215efa7..82cb53a 100644
--- a/include/asm-generic/system.h
+++ b/include/asm-generic/system.h
@@ -19,7 +19,6 @@
#include <linux/types.h>
#include <linux/irqflags.h>

-#include <asm/cmpxchg-local.h>
#include <asm/cmpxchg.h>

struct task_struct;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/