kthread: Return the assigned value rather than 0
PATCH 1/1 kthread: Return the assigned value rather than 0
Recently introduced kthread_affine_preferred() has a bug that the value of ret variable set but not used. This breaks the compilation with error (assume default CONFIG_WERROR=y and make W=1 to run the build):
kernel/kthread.c:862:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
--- kernel/kthread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/kthread.c +3 -1
@@ -889,10 +889,12 @@ int kthread_affine_preferred(struct task_struct *p, const struct cpumask *mask)raw_spin_unlock_irqrestore (&p->pi_lock, flags);mutex_unlock (&kthreads_hotplug_lock); + + ret =0 ; out:free_cpumask_var (affinity); -return 0 ; +return ret; }/*
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Quoted 8 lines · Andy Shevchenko
Recently introduced
kthread_affine_preferred()has a bug that the value of ret variable set but not used. This breaks the compilation with error (assume defaultCONFIG_WERROR=yandmake W=1to run the build):
kernel/kthread.c:862:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]Fixes 4d13f4304fa4 ("kthread: Implement preferred affinity")Signed-off-by Andy Shevchenko <[email protected]>
Thanks but I already have it queued there:
I'll do a pull request shortly.
Thanks!
Quoted 7 lines · Frederic Weisbecker
Quoted 6 lines · Andy Shevchenko
Recently introduced
kthread_affine_preferred()has a bug that the value of ret variable set but not used. This breaks the compilation with error (assume defaultCONFIG_WERROR=yandmake W=1to run the build):
kernel/kthread.c:862:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
Quoted 8 lines
Quoted 2 lines
Fixes 4d13f4304fa4 ("kthread: Implement preferred affinity")Signed-off-by Andy Shevchenko <[email protected]>Thanks but I already have it queued there:
I'll do a pull request shortly.
I'm fine with any approach as long as the issue will be fixed rather sooner.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 11 lines · Andy Shevchenko
Quoted 10 lines · Frederic Weisbecker
Quoted 8 lines · Andy Shevchenko
Recently introduced
kthread_affine_preferred()has a bug that the value of ret variable set but not used. This breaks the compilation with error (assume defaultCONFIG_WERROR=yandmake W=1to run the build):
kernel/kthread.c:862:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]Fixes 4d13f4304fa4 ("kthread: Implement preferred affinity")Signed-off-by Andy Shevchenko <[email protected]>
Quoted 7 lines
Quoted 5 lines
Thanks but I already have it queued there:
I'll do a pull request shortly.
I'm fine with any approach as long as the issue will be fixed rather sooner.
Any news? As of today no appearance of the (alternative) fix either in upstream, or in Linux Next. What's the plan, please?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 14 lines · Andy Shevchenko
Quoted 13 lines · Andy Shevchenko
Quoted 12 lines · Frederic Weisbecker
Quoted 8 lines · Andy Shevchenko
Recently introduced
kthread_affine_preferred()has a bug that the value of ret variable set but not used. This breaks the compilation with error (assume defaultCONFIG_WERROR=yandmake W=1to run the build):
kernel/kthread.c:862:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]Fixes 4d13f4304fa4 ("kthread: Implement preferred affinity")Signed-off-by Andy Shevchenko <[email protected]>Thanks but I already have it queued there:
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
I'll do a pull request shortly.
I'm fine with any approach as long as the issue will be fixed rather sooner.
Any news? As of today no appearance of the (alternative) fix either in upstream, or in Linux Next. What's the plan, please?
It's there for a week or so. I must confess I should have advertized it:
1b0332a42656 ("kthread: Fix return value on kzalloc() failure in kthread_affine_preferred()")
Thanks.
Quoted 19 lines · Frederic Weisbecker
Quoted 18 lines · Andy Shevchenko
Quoted 17 lines · Andy Shevchenko
Quoted 15 lines · Frederic Weisbecker
Quoted 8 lines · Andy Shevchenko
Recently introduced
kthread_affine_preferred()has a bug that the value of ret variable set but not used. This breaks the compilation with error (assume defaultCONFIG_WERROR=yandmake W=1to run the build):
kernel/kthread.c:862:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]Fixes 4d13f4304fa4 ("kthread: Implement preferred affinity")Signed-off-by Andy Shevchenko <[email protected]>Thanks but I already have it queued there:
I'll do a pull request shortly.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I'm fine with any approach as long as the issue will be fixed rather sooner.
Any news? As of today no appearance of the (alternative) fix either in upstream, or in Linux Next. What's the plan, please?
It's there for a week or so. I must confess I should have advertized it:
1b0332a42656("kthread: Fix return value onkzalloc()failure inkthread_affine_preferred()")
Thank you, I see it now!
Signature · 2 lines
With Best Regards, Andy Shevchenko