aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2010-10-20 19:01:12 -0400
committerIngo Molnar <mingo@elte.hu>2010-10-23 11:56:48 -0400
commitfe7de49f9d4e53f24ec9ef762a503f70b562341c (patch)
tree766b012c7199f12625bc909748175d9e37b0b87d /kernel/sched.c
parentd4429f608abde89e8bc1e24b43cd503feb95c496 (diff)
sched: Make sched_param argument static in sched_setscheduler() callers
Andrew Morton pointed out almost all sched_setscheduler() callers are using fixed parameters and can be converted to static. It reduces runtime memory use a little. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reported-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: James Morris <jmorris@namei.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d42992bccdfa..51944e8c38a8 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4701,7 +4701,7 @@ static bool check_same_owner(struct task_struct *p)
4701} 4701}
4702 4702
4703static int __sched_setscheduler(struct task_struct *p, int policy, 4703static int __sched_setscheduler(struct task_struct *p, int policy,
4704 struct sched_param *param, bool user) 4704 const struct sched_param *param, bool user)
4705{ 4705{
4706 int retval, oldprio, oldpolicy = -1, on_rq, running; 4706 int retval, oldprio, oldpolicy = -1, on_rq, running;
4707 unsigned long flags; 4707 unsigned long flags;
@@ -4856,7 +4856,7 @@ recheck:
4856 * NOTE that the task may be already dead. 4856 * NOTE that the task may be already dead.
4857 */ 4857 */
4858int sched_setscheduler(struct task_struct *p, int policy, 4858int sched_setscheduler(struct task_struct *p, int policy,
4859 struct sched_param *param) 4859 const struct sched_param *param)
4860{ 4860{
4861 return __sched_setscheduler(p, policy, param, true); 4861 return __sched_setscheduler(p, policy, param, true);
4862} 4862}
@@ -4874,7 +4874,7 @@ EXPORT_SYMBOL_GPL(sched_setscheduler);
4874 * but our caller might not have that capability. 4874 * but our caller might not have that capability.
4875 */ 4875 */
4876int sched_setscheduler_nocheck(struct task_struct *p, int policy, 4876int sched_setscheduler_nocheck(struct task_struct *p, int policy,
4877 struct sched_param *param) 4877 const struct sched_param *param)
4878{ 4878{
4879 return __sched_setscheduler(p, policy, param, false); 4879 return __sched_setscheduler(p, policy, param, false);
4880} 4880}