From ceb6918d1d4a413e79bfcaea46d63721d53af632 Mon Sep 17 00:00:00 2001 From: Saravana Kannan Date: Wed, 30 Mar 2022 14:58:30 -0700 Subject: [PATCH] ANDROID: vendor_hooks: Reduce pointless modversions CRC churn When vendor hooks are added to a file that previously didn't have any vendor hooks, we end up indirectly including linux/tracepoint.h. This causes some data types that used to be opaque (forward declared) to the code to become visible to the code. Modversions correctly catches this change in visibility, but we don't really care about the data types made visible when linux/tracepoint.h is included. So, hide this from modversions in the central vendor_hooks.h file instead of having to fix this on a case by case basis. Since this is a KMI frozen branch, existing vendor hook headers are left as is to avoid KMI breakage due to CRC churn. To avoid future pointless CRC churn, new vendor hook header files that include vendor_hooks.h should not include linux/tracepoint.h directly. Bug: 227513263 Bug: 226140073 Signed-off-by: Saravana Kannan Change-Id: Ia88e6af11dd94fe475c464eb30a6e5e1e24c938b --- drivers/android/vendor_hooks.c | 1 + include/trace/hooks/vendor_hooks.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 2e2285789229..2ae0b6eecc37 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -8,6 +8,7 @@ #define CREATE_TRACE_POINTS #include +#include #include #include #include diff --git a/include/trace/hooks/vendor_hooks.h b/include/trace/hooks/vendor_hooks.h index 87fe9ccdc331..2c2d57b6cf2a 100644 --- a/include/trace/hooks/vendor_hooks.h +++ b/include/trace/hooks/vendor_hooks.h @@ -7,7 +7,9 @@ * will override the DECLARE_RESTRICTED_HOOK and break the second include. */ +#ifndef __GENKSYMS__ #include +#endif #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)