mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Li zeming <zeming@nfschina.com>
To: tj@kernel.org, jiangshanlai@gmail.com
Cc: linux-kernel@vger.kernel.org, Li zeming <zeming@nfschina.com>
Subject: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from work_flags
Date: Wed, 30 Aug 2023 01:59:38 +0800	[thread overview]
Message-ID: <20230829175938.3000-1-zeming@nfschina.com> (raw)

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

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/workqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 800b4208dba9..45213c74d391 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -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
-- 
2.18.2


                 reply	other threads:[~2023-08-28  1:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230829175938.3000-1-zeming@nfschina.com \
    --to=zeming@nfschina.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®