From a10b746f324ca5d8997de1ee6743855af74eb1ad Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Tue, 11 Jan 2022 17:14:40 -0500 Subject: [PATCH] workqueue affinity: Remove unused variable After commit cfe452afa565 ("workqueue: Affine rescuer threads and unbound wqs", 2021-10-25) was merged, the kernel build process started to emit the following compilation warning: kernel/workqueue.c: In function 'workqueue_init_early': kernel/workqueue.c:5944:6: warning: unused variable 'hk_flags' \ [-Wunused-variable] int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; ^~~~~~~~ This occurs because the aforementioned commit removes all users of the hk_flags variable from the affected function, but does not remove the (now) unused variable. This commit removes the unused variable to avoid the compilation warning. Testing: * An ISO image was built successfully using a monolithic build procedure, and the kernel build logs were inspected to verify that the warning is no longer emitted. Change-Id: I622bf66716fb7bdf673a9e868b48b6979e71a3e5 Fixes: cfe452afa565 ("workqueue: Affine rescuer threads ...") Closes-Bug: 1958143 Signed-off-by: M. Vefa Bicakci --- ...ffine-rescuer-threads-and-unbound-wqs.patch | 18 ++++++++++++------ ...ffine-rescuer-threads-and-unbound-wqs.patch | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/kernel-rt/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch b/kernel-rt/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch index 0d4c3ee2..6040c81d 100644 --- a/kernel-rt/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch +++ b/kernel-rt/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch @@ -1,4 +1,4 @@ -From 9c5c44019a17897c46a2579a50abcd69f1bcb4a8 Mon Sep 17 00:00:00 2001 +From 6039b821dbe26c7708537e07276316dca36c1c0f Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Thu, 9 Sep 2021 04:56:46 -0400 Subject: [PATCH] workqueue: Affine rescuer threads and unbound wqs @@ -25,14 +25,14 @@ former. Signed-off-by: M. Vefa Bicakci Signed-off-by: Jiping Ma --- - kernel/workqueue.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + kernel/workqueue.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 1e2ca744dadb..f208096f28f1 100644 +index 1a4151c6faa6..3e3bd8d75f3c 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c -@@ -4235,7 +4235,7 @@ static int init_rescuer(struct workqueue_struct *wq) +@@ -4242,7 +4242,7 @@ static int init_rescuer(struct workqueue_struct *wq) } wq->rescuer = rescuer; @@ -41,7 +41,13 @@ index 1e2ca744dadb..f208096f28f1 100644 wake_up_process(rescuer->task); return 0; -@@ -5927,7 +5927,7 @@ void __init workqueue_init_early(void) +@@ -5941,13 +5941,12 @@ static void __init wq_numa_init(void) + void __init workqueue_init_early(void) + { + int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL }; +- int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; + int i, cpu; + BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); diff --git a/kernel-std/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch b/kernel-std/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch index 0d4c3ee2..c3ea0d8a 100644 --- a/kernel-std/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch +++ b/kernel-std/centos/patches/0012-workqueue-Affine-rescuer-threads-and-unbound-wqs.patch @@ -1,4 +1,4 @@ -From 9c5c44019a17897c46a2579a50abcd69f1bcb4a8 Mon Sep 17 00:00:00 2001 +From ee39df8a1626eb35797b0f9943dc881752c36588 Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Thu, 9 Sep 2021 04:56:46 -0400 Subject: [PATCH] workqueue: Affine rescuer threads and unbound wqs @@ -25,14 +25,14 @@ former. Signed-off-by: M. Vefa Bicakci Signed-off-by: Jiping Ma --- - kernel/workqueue.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + kernel/workqueue.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 1e2ca744dadb..f208096f28f1 100644 +index d6bdf3ad61e9..43f11a383cba 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c -@@ -4235,7 +4235,7 @@ static int init_rescuer(struct workqueue_struct *wq) +@@ -4242,7 +4242,7 @@ static int init_rescuer(struct workqueue_struct *wq) } wq->rescuer = rescuer; @@ -41,7 +41,13 @@ index 1e2ca744dadb..f208096f28f1 100644 wake_up_process(rescuer->task); return 0; -@@ -5927,7 +5927,7 @@ void __init workqueue_init_early(void) +@@ -5937,13 +5937,12 @@ static void __init wq_numa_init(void) + void __init workqueue_init_early(void) + { + int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL }; +- int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; + int i, cpu; + BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));