[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1481163221-40170-1-git-send-email-wangkefeng.wang@huawei.com>
Date: Thu, 8 Dec 2016 10:13:41 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: <linux-kernel@...r.kernel.org>
CC: Dmitry Vyukov <dvyukov@...gle.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Mark Rutland <mark.rutland@....com>,
James Morse <james.morse@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
<guohanjun@...wei.com>, Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: [PATCH] kcov: add more missing include
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@....com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.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
Powered by blists - more mailing lists