[PATCH] sched/headers: remove useless code in mm_cid_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clang static checker (scan-build) warning:
In file included from kernel/sched/core.c:88:
kernel/sched/sched.h:3501:2: warning: Value stored to 'cpumask' is never read
 3501 |         cpumask = mm_cidmask(mm);
      |         ^         ~~~~~~~~~~~~~~

'cpumask' has never been used before, delete it to save some space.

Signed-off-by: Su Hui <suhui@xxxxxxxxxxxx>
---
 kernel/sched/sched.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 4c36cc680361..d4088f1b8984 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -3494,11 +3494,9 @@ static inline int __mm_cid_get(struct rq *rq, struct mm_struct *mm)
 static inline int mm_cid_get(struct rq *rq, 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);
-- 
2.30.2





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux