From 9738c794d67489b8c7b7bdcf1cd2c2b2327783f9 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 490859df19b5..273b46903568 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -327,6 +327,8 @@ DECLARE_HOOK(android_vh_irqtime_account_process_tick, TP_PROTO(struct task_struct *p, struct rq *rq, int user_tick, int ticks), TP_ARGS(p, rq, user_tick, ticks)); +/* 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),