sched/core: fix variable "delta" set but not used
PATCH 1/1 sched/core: fix variable "delta" set but not used
The commit 5443a0be6121 ("sched: Use fair:prio_changed() instead of ad-hoc implementation") left behind an unused variable.
kernel/sched/core.c: In function 'set_user_nice':kernel/sched/core.c:4507:16: warning: variable 'delta' set but not used [-Wunused-but-set-variable]
int old_prio, delta;
^~~~~--- kernel/sched/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/sched/core.c +1 -2
@@ -4504,7 +4504,7 @@ static inline int rt_effective_prio(struct task_struct *p, int prio)void set_user_nice (struct task_struct *p,long nice) {bool queued, running; -int old_prio, delta; +int old_prio;struct rq_flags rf;struct rq *rq;
@@ -4538,7 +4538,6 @@ void set_user_nice(struct task_struct *p, long nice)set_load_weight (p, true); old_prio = p->prio; p->prio =effective_prio (p); - delta = p->prio - old_prio;if (queued)enqueue_task (rq, p,ENQUEUE_RESTORE |ENQUEUE_NOCLOCK );
Signature · 1 line
2.21.0 (Apple Git-122.2)
[tip: sched/core] sched/core: Remove unused variable from set_user_nice()
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 53a23364b6b0c679a8ecfc48e74d652f18e3631f Gitweb: https://git.kernel.org/tip/53a23364b6b0c679a8ecfc48e74d652f18e3631f Author: Qian Cai <[email protected]> AuthorDate: Thu, 19 Dec 2019 09:03:14 -05:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 25 Dec 2019 10:42:06 +01:00
sched/core: Remove unused variable from set_user_nice()
This commit left behind an unused variable:
5443a0be6121 ("sched: Use fair:prio_changed() instead of ad-hoc implementation") left behind an unused variable.
kernel/sched/core.c: In function 'set_user_nice':
kernel/sched/core.c:4507:16: warning: variable 'delta' set but not used
int old_prio, delta;
^~~~~--- kernel/sched/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/sched/core.c +1 -2
@@ -4504,7 +4504,7 @@ static inline int rt_effective_prio(struct task_struct *p, int prio)void set_user_nice (struct task_struct *p,long nice) {bool queued, running; -int old_prio, delta; +int old_prio;struct rq_flags rf;struct rq *rq;
@@ -4538,7 +4538,6 @@ void set_user_nice(struct task_struct *p, long nice)set_load_weight (p, true); old_prio = p->prio; p->prio =effective_prio (p); - delta = p->prio - old_prio;if (queued)enqueue_task (rq, p,ENQUEUE_RESTORE |ENQUEUE_NOCLOCK );