From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1035448AbdEXNVc (ORCPT ); Wed, 24 May 2017 09:21:32 -0400 Received: from smtp89.iad3a.emailsrvr.com ([173.203.187.89]:45408 "EHLO smtp89.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030812AbdEXNVU (ORCPT ); Wed, 24 May 2017 09:21:20 -0400 X-Auth-ID: abbotti@mev.co.uk X-Sender-Id: abbotti@mev.co.uk From: Ian Abbott To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Arnd Bergmann , Andrew Morton , Michal Nazarewicz , Hidehiro Kawai , Borislav Petkov , Rasmus Villemoes , Johannes Berg , Peter Zijlstra , Alexander Potapenko , Ian Abbott Subject: [PATCH 1/1] bug: fix problem including from linux/kernel.h Date: Wed, 24 May 2017 14:21:07 +0100 Message-Id: <20170524132107.6919-2-abbotti@mev.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170524132107.6919-1-abbotti@mev.co.uk> References: <20170524132107.6919-1-abbotti@mev.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If "include/linux/kernel.h" includes , a circular dependency is introduced when "include/asm-generic/bug.h" includes . This results in build breakage when something includes before for architectures that select `CONFIG_GENERIC_BUG` because `struct bug_entry` is not fully declared (not declared at all in fact) before its members are accessed by `is_warning_bug()`. To avoid this problem, remove the inclusion of from "include/asm-generic/bug.h", but include from "include/linux/bug.h" because it needs the `bool` type. A consequence of this change is that since most bug-related, function-link macros (`BUG()`, `WARN()` etc.) make use of facilities provided by , something else needs to include that before those macros are called. Signed-off-by: Ian Abbott Cc: Arnd Bergmann Cc: Andrew Morton Cc: Michal Nazarewicz Cc: Peter Zijlstra --- include/asm-generic/bug.h | 1 - include/linux/bug.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 87191357d303..074a66de47f6 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -12,7 +12,6 @@ #endif #ifndef __ASSEMBLY__ -#include #ifdef CONFIG_BUG diff --git a/include/linux/bug.h b/include/linux/bug.h index 687b557fc5eb..68692b775343 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -3,6 +3,7 @@ #include #include +#include enum bug_trap_type { BUG_TRAP_TYPE_NONE = 0, -- 2.11.0