Skip to contentSkip to conversation

kernel/workqueue: Remove unnecessary ‘0’ values from work_flags

PATCH New Li zeming 1 participant 1 message Aug 28, 2023 Workqueue

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 kernel/workqueue: Remove unnecessary ‘0’ values from work_flags

ret is assigned first, so it does not need to initialize the assignment.

---
 kernel/workqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/workqueue.c +2 -2
index 800b4208dba9..45213c74d391 100644
@@ -2988,7 +2988,7 @@ static void insert_wq_barrier(struct pool_workqueue *pwq,
 			      struct wq_barrier *barr,
 			      struct work_struct *target, struct worker *worker)
 {
-	unsigned int work_flags = 0;
+	unsigned int work_flags;
 	unsigned int work_color;
 	struct list_head *head;
 
@@ -3006,7 +3006,7 @@ static void insert_wq_barrier(struct pool_workqueue *pwq,
 	barr->task = current;
 
 	/* The barrier work item does not participate in pwq->nr_active. */
-	work_flags |= WORK_STRUCT_INACTIVE;
+	work_flags = WORK_STRUCT_INACTIVE;
 
 	/*
 	 * If @target is currently being executed, schedule the
Signature · 1 line
2.18.2