Message ID | 20230612081006.40821-1-luhongfei@vivo.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-scsi-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7035CC87FDC for <linux-scsi@archiver.kernel.org>; Mon, 12 Jun 2023 08:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbjFLIKX (ORCPT <rfc822;linux-scsi@archiver.kernel.org>); Mon, 12 Jun 2023 04:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjFLIKW (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Mon, 12 Jun 2023 04:10:22 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2128.outbound.protection.outlook.com [40.107.255.128]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AFA691; Mon, 12 Jun 2023 01:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iAFC70IB6SGXa643RqM37xDkxTuQhCpkAkremKCFlvKokJm4oLCqcUizUf5darT01ie63tY/dQ+7xTEOLkZzKoO3pzE7U1PFw70aca3cas0z4Q5+BGvQ5NrLYcViOcYQ8gWfKn5dMPa8nAJhoBWxUfYGoPqhZIuxUhX2xWVbKuSXAbcmBKgosKrZa6h3PVV7UlQZJA/7iXkXBpXhec9rVKEdhZHQJveb+1yx3J9VU1BcE6aAuTJkSa8+JoXtTvlYWOReaY/x4UATTCrxEkRRQ/abp1DKvhoPZxbKylK3cQBrlWoIUNaGcffdaWh9Iz6XQ5p/WAvJ1N/3Bx19knV9sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=s5vbFb1onfZ1+D7Zoq27f+qqsauoDymBJSBsQcPjQH0=; b=gVNt6lTT9dXbz1ePDs4TUE74ha+h6FrHSm/VgymNmLqqVjvg1yLnw6xiaQtlbrwOqtkNvXhcVl0SsIB9jTPhsRnTLOtGbCATRuoEwI3oiK0sBGBcEUg5fhsvHN8SQGb4S88NwE0LBLQxGA2FEWaLz+lwVSjRi1ZS7h9NzISG3oV0OXpcV5zimcT/u3jxkXWIrhN++4ojqt47Fk2+ugD2EECHtj1KUAbse1ToXUw7zE5cC7j7dNUWF43QY2kBiiMZa8iue5Jt7EMcKiA92EdGxzDvVgHJc6cgj47+nMwzeBfUdezyfKn2jk4NXDqPUmqlGJn0juIqJVBnqyPepHVSmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s5vbFb1onfZ1+D7Zoq27f+qqsauoDymBJSBsQcPjQH0=; b=XSC82YhZLRm+egYuq1ABTma43bTH25JAZSX4xZ/YHiAzYAVgBFQ+nYfz/DfwREgzPxcv/z2iReYoyjK2St1h6sPSSgpi57TX/GqT/pilM1r3knzMg/JgFfiWx8+bgIBnD3aXoYLCneFbCWiowSUW8/d6NPMU+3bu5kYBv44Cmn7/UfQTA3296w3S5iGhYHxX7pumXYmiQSoTMM+7r7oOos37Eh9y+aPpGQfCX/ohPrk9pbXobI8OHFbl9ZME5cbSr0SN0JCwBwLHkJLbnf429WuDcaEuHy3BcMi7A6N8Eo8JgtefO2/VK5OhdKSqWKemilAA7zuwTg6PdAuc799NFQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) by SI2PR06MB5291.apcprd06.prod.outlook.com (2603:1096:4:1e7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Mon, 12 Jun 2023 08:10:17 +0000 Received: from TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::f652:a96b:482:409e]) by TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::f652:a96b:482:409e%5]) with mapi id 15.20.6455.030; Mon, 12 Jun 2023 08:10:17 +0000 From: Lu Hongfei <luhongfei@vivo.com> To: "Martin K. Petersen" <martin.petersen@oracle.com>, linux-scsi@vger.kernel.org (open list:SCSI TARGET SUBSYSTEM), target-devel@vger.kernel.org (open list:SCSI TARGET SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, luhongfei@vivo.com Subject: [PATCH] drivers: target: Fix the conversion to bool in iblock_execute_pr_out Date: Mon, 12 Jun 2023 16:10:06 +0800 Message-Id: <20230612081006.40821-1-luhongfei@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYCP286CA0151.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:383::8) To TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6697:EE_|SI2PR06MB5291:EE_ X-MS-Office365-Filtering-Correlation-Id: d5882f15-5fa6-4f56-ca7a-08db6b1c755d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sxH+msn/apojbjksjSnMst08a1GyzH4kQVkfJCS00lxXIkE8Qv3/pejCivVF40UwBuV+s8c9wQ+xwVwdA77M+jJraMG8MRwlhRuxVw+6C7oluB/oUt0QUzuJ3NqJAs0XTh9qQr2DUeJQhyNT48R/NHHcB1NzqA/zgf8F6VhdrMp+0hDwV4QpHBjPWKhXcLHlHNhW8fsu5B8s/Q73UA+mCTCMDsY/20ke+TwFI4bNYjgSlF4z/4FP+cRIcAktcvlK1dCBYnSbmCwbuooE0uPAhSC+3+JxT82BFUtUROal5tbjL31c64ZT1Ag5h7xmn5ewwJchuZUoDhsYHOCbRzIYtkcITo7kZXWuEFyo5W4S0Lpp3oFSUEHs+sNumNpEA+YedUuPIlf31SyR8fuR1JjXTahbWxH7HS4eAJdG217G0qTmgcYzQ3qX4pepeiHSDJ+Xs24MGN1cjG8Q75xOJKYMMZiFFeAuvOG+J6qF3qfy21HNPYSUCSgD20/a2PiqOloxAt+phOYkmPrCot6/1SzVngSvK774KqzMFYSeHb1rsRLxq1DATBSmmzCrFLiacku/vpcAd8b+au8bRKk0K/V+ZCc+0QhgTX20dxxeHGcMmzN4JPrzN5Pskx2+vqFJ7RRo X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB6697.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(346002)(39860400002)(396003)(366004)(451199021)(6666004)(52116002)(6486002)(478600001)(26005)(107886003)(6512007)(6506007)(1076003)(83380400001)(186003)(36756003)(2616005)(38350700002)(38100700002)(86362001)(4326008)(66476007)(66556008)(66946007)(316002)(8936002)(8676002)(5660300002)(41300700001)(4744005)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yZlGE32ahR3Jx/mRqa6EQ9bYS6aarU1k9gJrGCb2G8vf9Q5cCafV23zdJfqmYb+1XZ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nL7ZRc1ojFt07EWwEOjEjn/aE8A+ph3HPIP0nDZcTjo7DZjiOaklHSyo5gdOyHhKdzubEvjsZOiL6xRG7ZNHxJG+aZIYMDsZM0HGOVd9EUQ5M3b0V4RuQtmYPvCzW3A853IiNApywiamd1Jq8BZW4fcIKZrgsccBaq/gYY08G8CrvEvifK47A5wqVEepd4q6Ui+vbH0UbquEsY/1uKV0cbgznLiEJ61wszIHSPSrVYVyfh5DGkXFYNo0vji8GPB/3WzDS/nFanlsf83OR9p7nfJWdxerzy/y6aOVfelXbVE/1WSEZM34Ou9FeqCrQZk+teUTRC20QA4dsoHdDlM6NQ1/qFELbLaOtuG/UD3VLLRmzsUgi0ysswRF4ZRxAPQCUdOZhNnSFb4cbkaS9L5lPccc647xPIF4wX9kPfe0LgL2CVYBtMsxAdiCM5+P9e9+LbiVBJ7tlafXVl+ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5882f15-5fa6-4f56-ca7a-08db6b1c755d X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6697.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 08:10:17.7394 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: H43qYAW4J3DI5jjbcaupx8Zvv/fzviOtQGRZngDY7eQlvxx94Q4zPeSOwINpqcDZxhc53Vvj7KkGNTMemNy+qQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5291 Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
drivers: target: Fix the conversion to bool in iblock_execute_pr_out
|
expand
|
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 254c33c9788e..ea42cb5d06d4 --- 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) {
The return value of the '==' or '!=' operator are bool, so there's no need to convert it to bool again in iblock_execute_pr_out. Signed-off-by: Lu Hongfei <luhongfei@vivo.com> --- drivers/target/target_core_iblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)