Skip to contentSkip to conversation

sched/core: remove unused variable

PATCH New Muhammad Falak R Wani 2 participants 2 messages May 5, 2016 – May 9, 2016 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/core: remove unused variable

Remove unused variable ret, and directly return 0.

---
 kernel/sched/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/core.c +2 -2
index 8b489fc..1e4f727 100644
@@ -7891,7 +7891,7 @@ static int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk)
 static int sched_rt_global_constraints(void)
 {
 	unsigned long flags;
-	int i, ret = 0;
+	int i;
 
 	raw_spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
 	for_each_possible_cpu(i) {
@@ -7903,7 +7903,7 @@ static int sched_rt_global_constraints(void)
 	}
 	raw_spin_unlock_irqrestore(&def_rt_bandwidth.rt_runtime_lock, flags);
 
-	return ret;
+	return 0;
 }
 #endif /* CONFIG_RT_GROUP_SCHED */
 
Signature · 1 line
1.9.1
#1 lore raw

[tip:sched/core] sched/core: Remove unused variable

sched/core: Remove unused variable
Commit-ID:  8c5e95548d41a48b1eb2be741107a259251ebd86
Gitweb:     http://git.kernel.org/tip/8c5e95548d41a48b1eb2be741107a259251ebd86
Author:     Muhammad Falak R Wani <[email protected]>
AuthorDate: Thu, 5 May 2016 15:21:19 +0530
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 9 May 2016 08:39:52 +0200

sched/core: Remove unused variable

Remove unused variable 'ret', and directly return 0.

---
 kernel/sched/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/core.c +2 -2
index 71c5a75..a6d3e7a 100644
@@ -8019,7 +8019,7 @@ static int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk)
 static int sched_rt_global_constraints(void)
 {
 	unsigned long flags;
-	int i, ret = 0;
+	int i;
 
 	raw_spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
 	for_each_possible_cpu(i) {
@@ -8031,7 +8031,7 @@ static int sched_rt_global_constraints(void)
 	}
 	raw_spin_unlock_irqrestore(&def_rt_bandwidth.rt_runtime_lock, flags);
 
-	return ret;
+	return 0;
 }
 #endif /* CONFIG_RT_GROUP_SCHED */