]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sched: Remove never used code in mm_cid_get()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 15 Oct 2025 09:19:34 +0000 (11:19 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Oct 2025 23:55:46 +0000 (16:55 -0700)
Clang is not happy with set but unused variable (this is visible
with `make W=1` build:

  kernel/sched/sched.h:3744:18: error: variable 'cpumask' set but not used [-Werror,-Wunused-but-set-variable]

It seems like the variable was never used along with the assignment
that does not have side effects as far as I can see.  Remove those
altogether.

Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sched/sched.h

index 1f5d07067f60a3195c11b0bfe203e027ebc3e3c5..361f9101cef97cde2b4cae963c3eed6e745283c8 100644 (file)
@@ -3740,11 +3740,9 @@ static inline int mm_cid_get(struct rq *rq, struct task_struct *t,
                             struct mm_struct *mm)
 {
        struct mm_cid __percpu *pcpu_cid = mm->pcpu_cid;
-       struct cpumask *cpumask;
        int cid;
 
        lockdep_assert_rq_held(rq);
-       cpumask = mm_cidmask(mm);
        cid = __this_cpu_read(pcpu_cid->cid);
        if (mm_cid_is_valid(cid)) {
                mm_cid_snapshot_time(rq, mm);