From: Daniel Wagner <wagi@monom.org>
To: cgroups@vger.kernel.org
Cc: netdev@vger.kernel.org,
Daniel Wagner <daniel.wagner@bmw-carit.de>,
Jamal Hadi Salim <jhs@mojatatu.com>, Tejun Heo <tj@kernel.org>,
Li Zefan <lizefan@huawei.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH v2 4/5] cgroup: Make builtin vs. module build ifdefs consistent
Date: Wed, 11 Jul 2012 11:35:40 +0200 [thread overview]
Message-ID: <1341999341-1808-5-git-send-email-wagi@monom.org> (raw)
In-Reply-To: <1341999341-1808-1-git-send-email-wagi@monom.org>
From: Daniel Wagner <daniel.wagner@bmw-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@bmw-carit.de>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: "David S. Miller" <davem@davemloft.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
next prev parent reply other threads:[~2012-07-11 9:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 9:35 [PATCH v2 0/5] cgroup cls & netprio 'cleanups' Daniel Wagner
2012-07-11 9:35 ` [PATCH v2 1/5] cgroup: Only update sk_cgrp_prioidx on change Daniel Wagner
2012-07-11 9:35 ` [PATCH v2 3/5] cgroup: Do not add sock_update_netprioidx() when CONFIG_NETPRIO_CGROUP=0 Daniel Wagner
2012-07-11 9:35 ` Daniel Wagner [this message]
[not found] ` <1341999341-1808-1-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-07-11 9:35 ` [PATCH v2 2/5] cgroup: Do not add sock_update_classid() when CONFIG_NET_CLS_CGROUP=0 Daniel Wagner
2012-07-11 9:35 ` [PATCH v2 5/5] cgroup: Make builtin vs. module build ifdefs consistent Daniel Wagner
2012-07-13 13:53 ` [PATCH v2 0/5] cgroup cls & netprio 'cleanups' Daniel Wagner
2012-07-13 15:04 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341999341-1808-5-git-send-email-wagi@monom.org \
--to=wagi@monom.org \
--cc=cgroups@vger.kernel.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=lizefan@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).