[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1341999341-1808-5-git-send-email-wagi@monom.org>
Date: Wed, 11 Jul 2012 11:35:40 +0200
From: Daniel Wagner <wagi@...om.org>
To: cgroups@...r.kernel.org
Cc: netdev@...r.kernel.org, Daniel Wagner <daniel.wagner@...-carit.de>,
Jamal Hadi Salim <jhs@...atatu.com>,
Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH v2 4/5] cgroup: Make builtin vs. module build ifdefs consistent
From: Daniel Wagner <daniel.wagner@...-carit.de>
The header file is using IS_MODULE and IS_BUILTIN macros. So let's
use them in the source file too.
Signed-off-by: Daniel Wagner <daniel.wagner@...-carit.de>
Cc: Jamal Hadi Salim <jhs@...atatu.com>
Cc: Tejun Heo <tj@...nel.org>
Cc: Li Zefan <lizefan@...wei.com>
Cc: "David S. Miller" <davem@...emloft.net>
---
net/sched/cls_cgroup.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 7743ea8..4bfb8f7 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -77,7 +77,7 @@ struct cgroup_subsys net_cls_subsys = {
.name = "net_cls",
.create = cgrp_create,
.destroy = cgrp_destroy,
-#ifdef CONFIG_NET_CLS_CGROUP
+#if IS_BUILTIN(CONFIG_NET_CLS_CGROUP)
.subsys_id = net_cls_subsys_id,
#endif
.base_cftypes = ss_files,
@@ -283,7 +283,7 @@ static int __init init_cgroup_cls(void)
if (ret)
goto out;
-#ifndef CONFIG_NET_CLS_CGROUP
+#if IS_MODULE(CONFIG_NET_CLS_CGROUP)
/* We can't use rcu_assign_pointer because this is an int. */
smp_wmb();
net_cls_subsys_id = net_cls_subsys.subsys_id;
@@ -301,7 +301,7 @@ static void __exit exit_cgroup_cls(void)
{
unregister_tcf_proto_ops(&cls_cgroup_ops);
-#ifndef CONFIG_NET_CLS_CGROUP
+#if IS_MODULE(CONFIG_NET_CLS_CGROUP)
net_cls_subsys_id = -1;
synchronize_rcu();
#endif
--
1.7.11.1.165.g299666c
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists