From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Wagner Subject: [PATCH v2 5/5] cgroup: Make builtin vs. module build ifdefs consistent Date: Wed, 11 Jul 2012 11:35:41 +0200 Message-ID: <1341999341-1808-6-git-send-email-wagi@monom.org> References: <1341999341-1808-1-git-send-email-wagi@monom.org> Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Daniel Wagner , Neil Horman , John Fastabend , Tejun Heo , Li Zefan , "David S. Miller" To: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: In-Reply-To: <1341999341-1808-1-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org From: Daniel Wagner 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 Cc: Neil Horman Cc: John Fastabend Cc: Tejun Heo Cc: Li Zefan Cc: "David S. Miller" --- net/core/netprio_cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index 3e953ea..2707948 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c @@ -252,7 +252,7 @@ struct cgroup_subsys net_prio_subsys = { .name = "net_prio", .create = cgrp_create, .destroy = cgrp_destroy, -#ifdef CONFIG_NETPRIO_CGROUP +#if IS_BUILTIN(CONFIG_NETPRIO_CGROUP) .subsys_id = net_prio_subsys_id, #endif .base_cftypes = ss_files, @@ -292,7 +292,7 @@ static int __init init_cgroup_netprio(void) ret = cgroup_load_subsys(&net_prio_subsys); if (ret) goto out; -#ifndef CONFIG_NETPRIO_CGROUP +#if IS_MODULE(CONFIG_NETPRIO_CGROUP) smp_wmb(); net_prio_subsys_id = net_prio_subsys.subsys_id; #endif @@ -312,7 +312,7 @@ static void __exit exit_cgroup_netprio(void) cgroup_unload_subsys(&net_prio_subsys); -#ifndef CONFIG_NETPRIO_CGROUP +#if IS_MODULE(CONFIG_NETPRIO_CGROUP) net_prio_subsys_id = -1; synchronize_rcu(); #endif -- 1.7.11.1.165.g299666c