[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2017 18:16:57 +0000
From: alexander.levin@...izon.com
To: "mingo@...nel.org" <mingo@...nel.org>
CC: "a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param
Commit d141babe4244 ("locking/lockdep: Add a boot parameter allowing
unwind in cross-release and disable it by default") has added a boot
time param to allow recording full stack traces in cross-release.
However, the commit used early_param() which wasn't wrapped in the
userspace headers, causing the following compilation error:
../../../kernel/locking/lockdep.c:89:13: error: expected declaration specifiers or ‘...’ before string constant
Fix it by creating a dummy declaration that uses the function pointer
to avoid declared but not used warnings.
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
---
tools/include/linux/kernel.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 0ad884452c5c..6d61a1a6c1d2 100644
--- a/tools/include/linux/kernel.h
+++ b/tools/include/linux/kernel.h
@@ -117,4 +117,6 @@ int scnprintf(char * buf, size_t size, const char * fmt, ...);
#define current_gfp_context(k) 0
#define synchronize_sched()
+#define early_param(str, fn) void __used *dummy##fn = fn;
+
#endif
--
2.11.0
Powered by blists - more mailing lists