LKML Archive on
 help / color / Atom feed
From: "tip-bot2 for Qian Cai" <>
Cc: Qian Cai <>,
	"Peter Zijlstra (Intel)" <>,
	Linus Torvalds <>,
	Thomas Gleixner <>,
	Ingo Molnar <>, x86 <>,
	LKML <>
Subject: [tip: sched/core] sched/core: Remove unused variable from set_user_nice()
Date: Wed, 25 Dec 2019 10:39:01 -0000
Message-ID: <157727034142.30329.18157750547564791762.tip-bot2@tip-bot2> (raw)
In-Reply-To: <>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     53a23364b6b0c679a8ecfc48e74d652f18e3631f
Author:        Qian Cai <>
AuthorDate:    Thu, 19 Dec 2019 09:03:14 -05:00
Committer:     Ingo Molnar <>
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;

Signed-off-by: Qian Cai <>
Signed-off-by: Peter Zijlstra (Intel) <>
Cc: Linus Torvalds <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Fixes: 5443a0be6121 ("sched: Use fair:prio_changed() instead of ad-hoc implementation")
Signed-off-by: Ingo Molnar <>
 kernel/sched/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 15508c2..1f6c094 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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);

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 14:03 [PATCH -next] sched/core: fix variable "delta" set but not used Qian Cai
2019-12-25 10:39 ` tip-bot2 for Qian Cai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=157727034142.30329.18157750547564791762.tip-bot2@tip-bot2 \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone