[PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param

From: alexander . levin
Date: Tue Dec 12 2017 - 13:18:06 EST


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@xxxxxxxxxxx>
---
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