Thread (15 messages) flat view 15 messages, 2 authors, 2018-02-20
STALE3086d

[RFC PATCH 2/5] asm-generic: Avoid including linux/kernel.h in asm-generic/bug.h

From: Will Deacon <hidden>
Date: 2018-02-15 17:56:05
Also in: lkml
Subsystem: errseq error tracking infrastructure, generic include/asm header files, library code, the rest · Maintainers: Jeff Layton, Arnd Bergmann, Andrew Morton, Linus Torvalds

asm-generic/bug.h unnecessarily includes linux/kernel.h whereas it can
get away with linux/types.h instead. lib/errseq.c relies on this transitive
include, so update it to include linux/kernel.h instead.

Signed-off-by: Will Deacon <redacted>
---
 include/asm-generic/bug.h | 2 +-
 lib/errseq.c              | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 963b755d19b0..ffda1247f639 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -15,7 +15,7 @@
 #endif
 
 #ifndef __ASSEMBLY__
-#include <linux/kernel.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_BUG
 
diff --git a/lib/errseq.c b/lib/errseq.c
index df782418b333..ef3b10516eab 100644
--- a/lib/errseq.c
+++ b/lib/errseq.c
@@ -3,6 +3,7 @@
 #include <linux/bug.h>
 #include <linux/atomic.h>
 #include <linux/errseq.h>
+#include <linux/kernel.h>
 
 /*
  * An errseq_t is a way of recording errors in one place, and allowing any
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help