lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1353302917-13995-57-git-send-email-josh@joshtriplett.org>
Date:	Sun, 18 Nov 2012 21:28:35 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org
Cc:	Josh Triplett <josh@...htriplett.org>
Subject: [PATCH 56/58] sched: Only define init_cfs_bandwidth stub when CONFIG_FAIR_GROUP_SCHED=y

kernel/sched/fair.c defines a stub version of init_cfs_bandwidth when
CONFIG_CFS_BANDWIDTH=n.  A few other places in the scheduler call
init_cfs_bandwidth, but only when CONFIG_FAIR_GROUP_SCHED=y, and
kernel/sched/sched.h only prototypes init_cfs_bandwidth when
CONFIG_FAIR_GROUP_SCHED=y.  Wrap the stub in an ifdef
CONFIG_FAIR_GROUP_SCHED as well, to avoid defining it when not needed,
and to satisfy GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/sched/fair.c:2098:6: warning: no previous prototype for ‘init_cfs_bandwidth’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@...htriplett.org>
---
 kernel/sched/fair.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7e29e80..0f03bf1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2095,9 +2095,8 @@ static inline int throttled_lb_pair(struct task_group *tg,
 	return 0;
 }
 
-void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
-
 #ifdef CONFIG_FAIR_GROUP_SCHED
+void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
 static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) {}
 #endif
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ