From 3397ed1439cfd8deb68299b082f75588e7ec175d Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Thu, 16 Apr 2015 18:13:10 +0530 Subject: [PATCH] cgroup: Fix build warnings when CGROUP not defined Commit 57114e95e8 ("cgroup: refactor allow_attach function into common code") unnecessarily added a dummy definition for subsys_cgroup_allow_attach when CONFIG_CGROUP is not set, so remove it to prevent warnings like... include/linux/cgroup.h:907:18: warning: 'struct cgroup_taskset' declared inside parameter list struct cgroup_taskset *tset) ^ include/linux/cgroup.h:907:18: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/cgroup.h:907:18: warning: 'struct cgroup' declared inside parameter list CC kernel/events/core.o In file included from kernel/events/core.c:41:0: include/linux/cgroup.h:907:18: warning: 'struct cgroup_taskset' declared inside parameter list struct cgroup_taskset *tset) Signed-off-by: Jon Medhurst Signed-off-by: Amit Pundir --- include/linux/cgroup.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index a2bcbd2e0f9a..fd7f1c0b6185 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -865,11 +865,6 @@ static inline int cgroup_attach_task_all(struct task_struct *from, return 0; } -static inline int subsys_cgroup_allow_attach(struct cgroup *cgrp, - struct cgroup_taskset *tset) -{ - return 0; -} #endif /* !CONFIG_CGROUPS */ #endif /* _LINUX_CGROUP_H */ -- 2.34.1