Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched: Remove never used code in mm_cid_get()

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>

authored by

Andy Shevchenko and committed by
Linus Torvalds
53abe3e1 3d08a425

-2
-2
kernel/sched/sched.h
··· 3740 3740 struct mm_struct *mm) 3741 3741 { 3742 3742 struct mm_cid __percpu *pcpu_cid = mm->pcpu_cid; 3743 - struct cpumask *cpumask; 3744 3743 int cid; 3745 3744 3746 3745 lockdep_assert_rq_held(rq); 3747 - cpumask = mm_cidmask(mm); 3748 3746 cid = __this_cpu_read(pcpu_cid->cid); 3749 3747 if (mm_cid_is_valid(cid)) { 3750 3748 mm_cid_snapshot_time(rq, mm);