[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240905091223.2350061-1-suhui@nfschina.com>
Date: Thu, 5 Sep 2024 17:12:24 +0800
From: Su Hui <suhui@...china.com>
To: mingo@...hat.com,
peterz@...radead.org,
juri.lelli@...hat.com,
vincent.guittot@...aro.org,
dietmar.eggemann@....com,
rostedt@...dmis.org,
bsegall@...gle.com,
mgorman@...e.de,
vschneid@...hat.com,
nathan@...nel.org,
ndesaulniers@...gle.com,
morbo@...gle.com,
justinstitt@...gle.com
Cc: Su Hui <suhui@...china.com>,
linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev,
kernel-janitors@...r.kernel.org
Subject: [PATCH] sched/headers: remove useless code in mm_cid_get()
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@...china.com>
---
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
Powered by blists - more mailing lists