From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: [PATCH v2 03/19] arm64: asm-offsets: Remove potential circular dependency Date: Mon, 11 Dec 2017 14:49:21 +0000 Message-ID: <20171211144937.4537-4-marc.zyngier@arm.com> References: <20171211144937.4537-1-marc.zyngier@arm.com> Return-path: In-Reply-To: <20171211144937.4537-1-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: Christoffer Dall , Mark Rutland , Catalin Marinas , Will Deacon , James Morse , Steve Capper List-Id: kvmarm@lists.cs.columbia.edu So far, we've been lucky enough that none of the include files that asm-offsets.c requires do include asm-offsets.h. This is about to change, and would introduce a nasty circular dependency... Let's now guard the inclusion of asm-offsets.h so that it never gets pulled from asm-offsets.c. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/asm-offsets.h | 2 ++ arch/arm64/kernel/asm-offsets.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/asm-offsets.h b/arch/arm64/include/asm/asm-offsets.h index d370ee36a182..ed8df3a9c95a 100644 --- a/arch/arm64/include/asm/asm-offsets.h +++ b/arch/arm64/include/asm/asm-offsets.h @@ -1 +1,3 @@ +#ifndef IN_ASM_OFFSET_GENERATOR #include +#endif diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 742887330101..74b9a26a84b5 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -18,6 +18,8 @@ * along with this program. If not, see . */ +#define IN_ASM_OFFSET_GENERATOR 1 + #include #include #include -- 2.14.2