Skip to contentSkip to conversation

kernel/sched: removed unused *cpumask ptr in kernel/sched/sched.h

PATCH Superseded Aditya Gollamudi 3 participants 4 messages Oct 20, 2025 – Oct 21, 2025 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/sched: removed unused *cpumask ptr in kernel/sched/sched.h

From: Adi Gollamudi <[email protected]>

remove use of cpumask ptr initialized at the top of the mm_cid_get() function to nothing. remove initialization of cpumask ptr in the same function, "cpumask = mm_cidmask(mm);" because it is not used later.

---
 kernel/sched/sched.h | 2 --
 1 file changed, 2 deletions(-)
kernel/sched/sched.h +0 -2
index be9745d104f7..d5d943681bf8 100644
@@ -3710,11 +3710,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);
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/1 kernel/sched: removed unused *cpumask ptr in kernel/sched/sched.h

From: Adi Gollamudi <[email protected]>

v2: fix formatting and style errors found by checkpatch.pl. no actual functional changes

v1: remove use of cpumask ptr initialized at the top of the mm_cid_get() function to nothing. remove initialization of cpumask ptr in the same function, "cpumask = mm_cidmask(mm);" because it is not used later.

---
 kernel/sched/sched.h | 2 --
 1 file changed, 2 deletions(-)
kernel/sched/sched.h +0 -2
index be9745d104f7..d5d943681bf8 100644
@@ -3710,11 +3710,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);

--
2.34.1

#2 lore raw
Quoted 8 lines · Aditya Gollamudi

From: Adi Gollamudi <[email protected]>

v2: fix formatting and style errors found by checkpatch.pl. no actual functional changes

v1: remove use of cpumask ptr initialized at the top of the mm_cid_get() function to nothing. remove initialization of cpumask ptr in the same function, "cpumask = mm_cidmask(mm);" because it is not used later.

Please see Documentation/process/submitting-patches; the version changelogs don't belong in the patch body but should rather be put after the '---' marker line.

maintainer
#3 lore raw
Quoted 5 lines · Valentin Schneider
Quoted 4 lines · Aditya Gollamudi

From: Adi Gollamudi <[email protected]>

v2: fix formatting and style errors found by checkpatch.pl. no actual functional changes

Quoted 9 lines
Quoted 4 lines

v1: remove use of cpumask ptr initialized at the top of the mm_cid_get() function to nothing. remove initialization of cpumask ptr in the same function, "cpumask = mm_cidmask(mm);" because it is not used later.

Please see Documentation/process/submitting-patches; the version changelogs don't belong in the patch body but should rather be put after the '---' marker line.

Also, please search the archives before sending patches like this. You'll find I have at least 5 versions of this patch already, and I'm still not convinced its worth applying.