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 <vefa.bicakci@windriver.com>
This commit is contained in:
M. Vefa Bicakci 2022-01-11 17:14:40 -05:00
parent 8f969b2440
commit a10b746f32
2 changed files with 24 additions and 12 deletions

View File

@ -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" <vefa.bicakci@windriver.com> From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
Date: Thu, 9 Sep 2021 04:56:46 -0400 Date: Thu, 9 Sep 2021 04:56:46 -0400
Subject: [PATCH] workqueue: Affine rescuer threads and unbound wqs Subject: [PATCH] workqueue: Affine rescuer threads and unbound wqs
@ -25,14 +25,14 @@ former.
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com> Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com> Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
--- ---
kernel/workqueue.c | 4 ++-- kernel/workqueue.c | 5 ++---
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 1e2ca744dadb..f208096f28f1 100644 index 1a4151c6faa6..3e3bd8d75f3c 100644
--- a/kernel/workqueue.c --- a/kernel/workqueue.c
+++ b/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; wq->rescuer = rescuer;
@ -41,7 +41,13 @@ index 1e2ca744dadb..f208096f28f1 100644
wake_up_process(rescuer->task); wake_up_process(rescuer->task);
return 0; 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)); BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));

View File

@ -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" <vefa.bicakci@windriver.com> From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
Date: Thu, 9 Sep 2021 04:56:46 -0400 Date: Thu, 9 Sep 2021 04:56:46 -0400
Subject: [PATCH] workqueue: Affine rescuer threads and unbound wqs Subject: [PATCH] workqueue: Affine rescuer threads and unbound wqs
@ -25,14 +25,14 @@ former.
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com> Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com> Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
--- ---
kernel/workqueue.c | 4 ++-- kernel/workqueue.c | 5 ++---
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 1e2ca744dadb..f208096f28f1 100644 index d6bdf3ad61e9..43f11a383cba 100644
--- a/kernel/workqueue.c --- a/kernel/workqueue.c
+++ b/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; wq->rescuer = rescuer;
@ -41,7 +41,13 @@ index 1e2ca744dadb..f208096f28f1 100644
wake_up_process(rescuer->task); wake_up_process(rescuer->task);
return 0; 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)); BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));