From 0f6320f05b96b225bddd58c8b3d080d1d98baa49 Mon Sep 17 00:00:00 2001 From: Xuewen Yan Date: Tue, 27 Jun 2023 19:10:18 +0800 Subject: [PATCH] ANDROID: fix build error when use cpu_cgroup_online vh When register_trace_rvh_cpu_cgroup_online, it would report error: declaration of 'struct cgroup_subsys_state' will not be visible outside of this function: TP_PROTO(struct cgroup_subsys_state *css), So add declaration of 'struct cgroup_subsys_state' on the top of vh. Bug: 289018298 Fixes: 5f657b04f4f2 ("ANDROID: subsystem-specific vendor_hooks.c for sched") Change-Id: I3da0bee61b193ef9d998ebff79ceb91fec12ceff Signed-off-by: Xuewen Yan --- include/trace/hooks/cgroup.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/trace/hooks/cgroup.h b/include/trace/hooks/cgroup.h index b8510d6d7e58..26e8ac58344a 100644 --- a/include/trace/hooks/cgroup.h +++ b/include/trace/hooks/cgroup.h @@ -8,21 +8,21 @@ #include struct task_struct; +struct cgroup_taskset; +struct cgroup_subsys; +struct cgroup_subsys_state; DECLARE_HOOK(android_vh_cgroup_set_task, TP_PROTO(int ret, struct task_struct *task), TP_ARGS(ret, task)); -struct cgroup_subsys; -struct cgroup_taskset; DECLARE_HOOK(android_vh_cgroup_attach, TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset), TP_ARGS(ss, tset)) + DECLARE_RESTRICTED_HOOK(android_rvh_cgroup_force_kthread_migration, TP_PROTO(struct task_struct *tsk, struct cgroup *dst_cgrp, bool *force_migration), TP_ARGS(tsk, dst_cgrp, force_migration), 1); -struct cgroup_taskset; -struct cgroup_subsys; DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_attach, TP_PROTO(struct cgroup_taskset *tset),