From de1a0ea81182525e905d2bb1924a42da51357571 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Tue, 29 Jun 2021 21:39:26 -0700 Subject: [PATCH] ANDROID: logbuf: Remove if directive for vendor hooks When CONFIG_TRACEPOINTS or CONFIG_ANDROID_VENDOR_HOOKS is not set, there is a build error after commit 01f2392e13db ("ANDROID: logbuf: Add new logbuf vendor hook to support pr_cont()"): kernel/printk/printk.c:1962:4: error: implicit declaration of function 'trace_android_vh_logbuf_pr_cont' [-Werror,-Wimplicit-function-declaration] trace_android_vh_logbuf_pr_cont(&r, text_len); ^ 1 error generated. Remove the #if directive so that this code always builds properly, which is possible after commit ba75b92fefa9 ("ANDROID: simplify vendor hooks for non-GKI builds"). Change-Id: Icc7f55af1becab5a8833b0651402845559b6b56f Fixes: 01f2392e13db ("ANDROID: logbuf: Add new logbuf vendor hook to support pr_cont()") Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/2948254099 Suggested-by: Todd Kjos Signed-off-by: Nathan Chancellor --- include/trace/hooks/logbuf.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/trace/hooks/logbuf.h b/include/trace/hooks/logbuf.h index 7af9122af8ad..f73ad597fc64 100644 --- a/include/trace/hooks/logbuf.h +++ b/include/trace/hooks/logbuf.h @@ -10,7 +10,6 @@ #include #include -#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) struct printk_ringbuffer; struct printk_record; @@ -21,9 +20,6 @@ DECLARE_HOOK(android_vh_logbuf, DECLARE_HOOK(android_vh_logbuf_pr_cont, TP_PROTO(struct printk_record *r, size_t text_len), TP_ARGS(r, text_len)) -#else -#define trace_android_vh_logbuf(rb, r) -#endif #endif /* _TRACE_HOOK_LOGBUF_H */ /* This part must be outside protection */