public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: Remove unused variable in mm_cid_get()
@ 2025-10-17  7:30 Kevin Brodsky
  2025-10-20 10:16 ` Christian Loehle
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Brodsky @ 2025-10-17  7:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kevin Brodsky, Mathieu Desnoyers, Ingo Molnar, Peter Zijlstra,
	Juri Lelli

The cpumask variable in mm_cid_get() has never been used, remove it.

This fixes a -Wunused-but-set-variable warning when building with
W=1.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
---
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
---
 kernel/sched/sched.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 1f5d07067f60..361f9101cef9 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -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);

base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched: Remove unused variable in mm_cid_get()
  2025-10-17  7:30 [PATCH] sched: Remove unused variable in mm_cid_get() Kevin Brodsky
@ 2025-10-20 10:16 ` Christian Loehle
  2025-10-20 10:34   ` Kevin Brodsky
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Loehle @ 2025-10-20 10:16 UTC (permalink / raw)
  To: Kevin Brodsky, linux-kernel, andriy.shevchenko
  Cc: Mathieu Desnoyers, Ingo Molnar, Peter Zijlstra, Juri Lelli

On 10/17/25 08:30, Kevin Brodsky wrote:
> The cpumask variable in mm_cid_get() has never been used, remove it.
> 
> This fixes a -Wunused-but-set-variable warning when building with
> W=1.
> 
> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
> ---
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> ---
>  kernel/sched/sched.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 1f5d07067f60..361f9101cef9 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -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);
> 
> base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787

Andy also posted this:
https://lore.kernel.org/lkml/20251015091935.2977229-1-andriy.shevchenko@linux.intel.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched: Remove unused variable in mm_cid_get()
  2025-10-20 10:16 ` Christian Loehle
@ 2025-10-20 10:34   ` Kevin Brodsky
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Brodsky @ 2025-10-20 10:34 UTC (permalink / raw)
  To: Christian Loehle, linux-kernel, andriy.shevchenko
  Cc: Mathieu Desnoyers, Ingo Molnar, Peter Zijlstra, Juri Lelli

On 20/10/2025 12:16, Christian Loehle wrote:
> On 10/17/25 08:30, Kevin Brodsky wrote:
>> The cpumask variable in mm_cid_get() has never been used, remove it.
>>
>> This fixes a -Wunused-but-set-variable warning when building with
>> W=1.
>>
>> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
>> ---
>> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>> Cc: Juri Lelli <juri.lelli@redhat.com>
>> ---
>>  kernel/sched/sched.h | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
>> index 1f5d07067f60..361f9101cef9 100644
>> --- a/kernel/sched/sched.h
>> +++ b/kernel/sched/sched.h
>> @@ -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);
>>
>> base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
> Andy also posted this:
> https://lore.kernel.org/lkml/20251015091935.2977229-1-andriy.shevchenko@linux.intel.com/

Ah I missed it, thanks! Please ignore my patch then (especially since it
misses a Fixes: tag).

- Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-20 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17  7:30 [PATCH] sched: Remove unused variable in mm_cid_get() Kevin Brodsky
2025-10-20 10:16 ` Christian Loehle
2025-10-20 10:34   ` Kevin Brodsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox