From 8d6d335851a10c6b352d63801c2a0f9370e3bfc6 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 21 Jun 2022 09:33:55 -0700 Subject: [PATCH] ANDROID: Fix build error with CONFIG_UCLAMP_TASK disabled After 7b26719a77c4 ("ANDROID: GKI: use internal type definitions in vendor hooks") we stopped providing a forward declaration of 'struct uclamp_se' and instead relied on pulling its definition from linux/sched.h. the 'uclamp_se' structure is conditionally defined based upon CONFIG_UCLAMP_TASK therefore causing a build error to show up for the android_rvh_uclamp_eff_get trace point. Fix this by providing a forward declaration of 'struct uclamp_se' like before. Fixes: 7b26719a77c4 ("ANDROID: GKI: use internal type definitions in vendor hooks") Signed-off-by: Florian Fainelli Change-Id: Iaa803d149150c1703435f9cfa52ea1406a9521fd --- include/trace/hooks/sched.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index 891c89fa8262..c3fc9bf6f8e9 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -283,6 +283,8 @@ DECLARE_HOOK(android_vh_set_wake_flags, TP_PROTO(int *wake_flags, unsigned int *mode), TP_ARGS(wake_flags, mode)); +/* Conditionally defined upon CONFIG_UCLAMP_TASK */ +struct uclamp_se; DECLARE_RESTRICTED_HOOK(android_rvh_uclamp_eff_get, TP_PROTO(struct task_struct *p, enum uclamp_id clamp_id, struct uclamp_se *uclamp_max, struct uclamp_se *uclamp_eff, int *ret),