From patchwork Tue Aug 29 17:59:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 136992 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp3065187vqm; Sun, 27 Aug 2023 18:52:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHUriLhERwxCS28HGKWEUYMtUQjWxHExMTiIdhKEkWVtPzBiGAK0LUHRWtkovpaLWqMld0 X-Received: by 2002:a05:6a20:7d85:b0:14b:f8d0:c276 with SMTP id v5-20020a056a207d8500b0014bf8d0c276mr10017162pzj.29.1693187573835; Sun, 27 Aug 2023 18:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693187573; cv=none; d=google.com; s=arc-20160816; b=yTLDSps0oYlrXKFFupamdoYcxlA8/P2DJke/er/5Wwfv2TtG7b9Z8OX8nFHqOcpP9b ds67qKYH3u1FYqKwgnfVKDh97mc4wfwx4lALMh9NY7qrlncMKWXmiInmurP+WpZq93Es EChFHO1+22X4Smd3tWaVhSKW7wTQNdwH3Mz5arVIcI1G3vujlHcxzcf6D8tivyHI1qQe ++bMDTpIN1TuQtcvq2MQz+e2wzmiPqC3YTzdODRkGknZEGFMD+/+FdDgLXmnjTxWhiDo qt0KpMTrAtc51Rxjs+C67ysiXu9PplfOhFYCulefFGYNiLgKQDHaw0xwM7Pochl+8VHZ 2tOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=IzkQRYZ7wFyh1PnRixVXvp4KBBpnmZ+jAGmmRSnDVvY=; fh=wHVpxrhBjjdxOlwBmpif3tWvAA/einWXWYK/TjGVA6c=; b=JPal/DQxKo3beEeVvlryQd1VtrLhTRtzp+vmL3dS/q0l9QgMqiQnzHLM2k2/Z5M8KC IlKpMIHKY2CFk3BXh9Zd7yt0zSVZugruYSK7CeGnOXtAU3k0FeuIIo0olrWrXruGfI3C l0qP7+699EG/Wj6XlDN9rclstsFkZrHKJ1edzeWNHKAYu85hXGRMUCD9QCy6s4doxSl9 eBbpZBmDK43/Nv9gOycS40IoUwgTNcB5YIs8oOyZPx2M0lDaC3BGprL4eamF7EUJWmyP dVn7BoNyACNr2rcXM+VyaBkC1cnj4eguSm+6drmB5RPTHtMt4xLmcrdBvOG2h34x9ObD EjNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020a170902d54300b001bdcd2e1706si4038554plf.196.2023.08.27.18.52.41; Sun, 27 Aug 2023 18:52:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbjH1B26 (ORCPT + 99 others); Sun, 27 Aug 2023 21:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbjH1B2g (ORCPT ); Sun, 27 Aug 2023 21:28:36 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id AEB2CCC for ; Sun, 27 Aug 2023 18:28:32 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 3CB3D6049A9D7; Mon, 28 Aug 2023 09:28:19 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: tj@kernel.org, jiangshanlai@gmail.com Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?kernel/workqueue=3A_Remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_work=5Fflags?= Date: Wed, 30 Aug 2023 01:59:38 +0800 Message-Id: <20230829175938.3000-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775435853583395483 X-GMAIL-MSGID: 1775435853583395483 ret is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- 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