Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1538275

[PATCH] kcov: add more missing include

From Kefeng Wang <wangkefeng.wang@huawei.com>
Newsgroups linux.kernel
Subject [PATCH] kcov: add more missing include
Date 2016-12-08 03:30 +0100
Message-ID <sLWD7-8sB-15@gated-at.bofh.it> (permalink)
References <sLlWV-1jt-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


It is fragile that some definitions acquired via transitive
dependencies, as shown in below:

atomic_*        (<linux/atomic.h>)
ENOMEM/EN*      (<linux/errno.h>)
EXPORT_SYMBOL   (<linux/export.h>)
device_initcall (<linux/init.h>)
preempt_*       (<linux/preempt.h>)

Include them to prevent possible issues.

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 kernel/kcov.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/kcov.c b/kernel/kcov.c
index 3cbb0c8..cc2fa35ca 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -1,11 +1,16 @@
 #define pr_fmt(fmt) "kcov: " fmt
 
 #define DISABLE_BRANCH_PROFILING
+#include <linux/atomic.h>
 #include <linux/compiler.h>
+#include <linux/errno.h>
+#include <linux/export.h>
 #include <linux/types.h>
 #include <linux/file.h>
 #include <linux/fs.h>
+#include <linux/init.h>
 #include <linux/mm.h>
+#include <linux/preempt.h>
 #include <linux/printk.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
-- 
1.7.12.4

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] kcov: add missing #include <linux/sched.h> Kefeng Wang <wangkefeng.wang@huawei.com> - 2016-12-06 08:10 +0100
  Re: [PATCH] kcov: add missing #include <linux/sched.h> Mark Rutland <mark.rutland@arm.com> - 2016-12-06 12:20 +0100
    [PATCH] kcov: add more missing include Kefeng Wang <wangkefeng.wang@huawei.com> - 2016-12-08 03:30 +0100

csiph-web