From patchwork Wed May 24 05:11:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 98295 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2611363vqo; Tue, 23 May 2023 22:32:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56vUnB85lA/WfseDxc6NPZ3nTy0b+tpHIZhn1a9fpYRc9BzTJX8CZlBXyw0qyPMeJ82Izb X-Received: by 2002:a05:6a20:7fa1:b0:104:873:c3b5 with SMTP id d33-20020a056a207fa100b001040873c3b5mr17251417pzj.44.1684906323505; Tue, 23 May 2023 22:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684906323; cv=none; d=google.com; s=arc-20160816; b=WbAioFPOPUxvNHz+yszmHZyXlbduhkD8gcVM7ScuUS74BC6eFh7LoRWspzIhOhLwdx 19SNHhSio/rRgl8hSYA3jF+O/kxLah0ZhdCUBP2V8GDc0jaVsbb4cL+DHnY57DBfm9F1 xPD49n29heJ2xRvmaizCVV6VpxtbX6c3j4ufZSDhqmmUJQ8rJwat5kDvSUN7LTEa51iP A3o7wL0tW69V//t+RdQFWoOLjlFD3yrsP32nnxB6Yf4SiG4uNIUDnN5TpMIUCqFnTYuH wPYS7H25qWgn/4E4iP64sMDYQUuE0D4dGp1sADa6B8juoHTOebG4dzH4bfW2jmLkAc+y S4xQ== 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=HLuQKAyf74SjnziIgZlCuld95B+bQmC1Ol9J+Cv7x9Y=; b=gX4ANLsn6a8xTwyVlLTBEE/Zz8Z6hr0feB+2yMVdyRUqbaQoA1YAusPg8u5HkUzB7/ BZHvvx16X+tOBZai4dOpTX+BjBOb6fAQbJLBERn2UWA9rPnw0lhjWQ15z8S/PaKSre1B VB0RPFEoMu/SvdC8VJyHzGCRZCbdO+g92Xy9232MveA0Ntkoa2O7NNHt3Qr85a1l/h47 iAd8Q+aRmKwh7qwj/N45X9Zx59RtCaiCGa1QKXRTw/RtnqRA76ChnUV4C19OyAP9BAK+ nNCkkjJJVNXFxwAyymkgizeyQ3y61+RJV2zT/Y/U2G4mOLt+uMdRaZen9P7wwzYqdjCJ 8lnQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g25-20020a633759000000b005346d98e74asi7580287pgn.36.2023.05.23.22.31.51; Tue, 23 May 2023 22:32:03 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239291AbjEXFMA (ORCPT + 99 others); Wed, 24 May 2023 01:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239263AbjEXFL4 (ORCPT ); Wed, 24 May 2023 01:11:56 -0400 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1774189; Tue, 23 May 2023 22:11:52 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R291e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VjMkCwD_1684905109; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VjMkCwD_1684905109) by smtp.aliyun-inc.com; Wed, 24 May 2023 13:11:50 +0800 From: Yang Li To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] scsi: target: Simplify bool conversion Date: Wed, 24 May 2023 13:11:48 +0800 Message-Id: <20230524051148.96937-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766752333515560179?= X-GMAIL-MSGID: =?utf-8?q?1766752333515560179?= ./drivers/target/target_core_iblock.c:892:30-35: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5300 Signed-off-by: Yang Li --- drivers/target/target_core_iblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index e6029ea87e2f..7a27de807902 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -889,7 +889,7 @@ static sense_reason_t iblock_execute_pr_out(struct se_cmd *cmd, u8 sa, u64 key, ret = ops->pr_preempt(bdev, key, sa_key, scsi_pr_type_to_block(type), - sa == PRO_PREEMPT ? false : true); + sa != PRO_PREEMPT); break; case PRO_RELEASE: if (!ops->pr_clear) {