From patchwork Wed Nov 1 08:19:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 160464 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp259699vqx; Wed, 1 Nov 2023 01:20:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQbH+FTeIQteE83uSlkR/HI76Ratfwcn486jtpMzjpEqoqTyVL2VtKre3D8d1eEnrwtAdU X-Received: by 2002:a05:6359:7297:b0:168:eb96:f495 with SMTP id uw23-20020a056359729700b00168eb96f495mr13306822rwb.16.1698826836212; Wed, 01 Nov 2023 01:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698826836; cv=none; d=google.com; s=arc-20160816; b=NfXzkVtBvdPrmOg+B2stN7KEjasMHKO3A4GCxpPHKPeSOLvKnxwOqRZfKCd6HHUbbe Ml5cHQsuvOgdmReoxOp5kYYe5a9oUzdHW94NwdoWA8bYmPYgyUjIaI5P0RuqLY5K1qsO RZYJfceilW2GcYWDeOPpqidNd2Ic8nqGk2/R1u9aA4+PkK0FI0GzQ4e+RMaIUx4NDJUi z7Y7yP2n+BhSt4rXuL0CSMbU2DJ+siO6aLyzcJI7IwE0ZHQNu7tmsDyqaeuEXMz0if4L Cabzyy2FxILlQHqdoB40e2BrYGUwymEVxZEVV94Y6LPzFkCCNf7Zw+Cftim/C4IZQTCc AVUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=p4W6mQv+XTJIHk9dj1XZMwn2F5p/A7uBjg/QKSmwhno=; fh=8P2QtWlfHdQSjznqVZ63DXJ6Mx5djUxmZnaRFIVhmuA=; b=J3ZrwTnIGMF7hNu6dSSwVtxMBPPq2QOZAVr0zo4dbZlfA8LsZ4ppuHbDTZqbbf023X KotUFidBJAP63JBdwWRmDPztOHzZtkAcYVE+yAceHZyyfneXLwdVEica90JntGoHda/n WCWm0Es0qlhZKcsyQHrCWGrwlUONzpP/G5Q7cGjYJU3iYnrD+AwdY6hRRuO1iei0b0II +eVfgWC9N2ncRaX8lc5cFqnhFCNyHdClFNbeLl98P1JLZ9AFPeNeS1RtK4Y0tpG3yuJa KDUGuJd5h7eZzjpc0hiFSj7IQDod83MCyR153PGfHQ6eJAC5Yh0djAFzW4R8uh35Mz6C 0smw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id p25-20020a63b819000000b005b74e2e9d56si716211pge.385.2023.11.01.01.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 01:20:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9F0FE805D574; Wed, 1 Nov 2023 01:20:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231570AbjKAIUR (ORCPT + 35 others); Wed, 1 Nov 2023 04:20:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjKAIUQ (ORCPT ); Wed, 1 Nov 2023 04:20:16 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 03904B4 for ; Wed, 1 Nov 2023 01:20:12 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 433AC6059605E; Wed, 1 Nov 2023 16:19:47 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu To: akpm@linux-foundation.org, michael.christie@oracle.com, brauner@kernel.org, mst@redhat.com, npiggin@gmail.com, qiang1.zhang@intel.com, arve@android.com, gregkh@linuxfoundation.org, quic_pbaronia@quicinc.com Cc: linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] kthread: Modify the ret variable type to bool Date: Wed, 1 Nov 2023 16:19:40 +0800 Message-Id: <20231101081940.6147-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 01:20:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781349048736240785 X-GMAIL-MSGID: 1781349048736240785 The value of ret assigned as bool type, and when combined with the function return type ret, it should be defined as bool. Signed-off-by: Li kunyu --- kernel/kthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 1eea53050babc..9204693e07c68 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -1241,7 +1241,7 @@ bool kthread_mod_delayed_work(struct kthread_worker *worker, { struct kthread_work *work = &dwork->work; unsigned long flags; - int ret; + bool ret; raw_spin_lock_irqsave(&worker->lock, flags); @@ -1286,7 +1286,7 @@ static bool __kthread_cancel_work_sync(struct kthread_work *work, bool is_dwork) { struct kthread_worker *worker = work->worker; unsigned long flags; - int ret = false; + bool ret = false; if (!worker) goto out;