Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4304803ybz; Mon, 20 Apr 2020 20:43:52 -0700 (PDT) X-Google-Smtp-Source: APiQypLjflSoxhGMkOG5iAvvv8dMjnLSW6DbjQrSB53vNOmm2ZmsmE2Hi0PlT6UMIKla3CAG9eob X-Received: by 2002:aa7:dcd7:: with SMTP id w23mr501494edu.300.1587440631990; Mon, 20 Apr 2020 20:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587440631; cv=none; d=google.com; s=arc-20160816; b=iw8pp8Urg7JGLNua5DGow1JgB2N0Y92RII1ksVioLqMLw0IK8Jqpyf4gWpPEcG9Mvg FE6/M8MOdolu8Ym9xidE7VjQ4jAKH6i+O60ygAJDI85vXAHZyjMlVNOflsbyWn1eoTtA Ib7RHmVmzucAO3JaVyOXgQ7W4coxyK2tbsbF6cxOJhjK5iXs3p3rwMzzKocCGfe6VGXS M22BcGqQvopmYtJ9rgTzejhtXNE2XNthT+oSeT7DpBE8fhkTqvseTwS7XyhDkoxCzFm2 J2COMn5ns+b/bzS/bcdiiQcPQm7GJ2Jxv8wQk4kZX3ChuVySWhjCQBgvKnRnxAQdaEwe BfBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=UooLJ2AaafMdE6PH3L6QUCQ0eVG1HvXuVa75PTZ6K6E=; b=SJaaTrVhAR4cifT+FzPg1RMDOgyFJdaKOoNCrU5gXT6zT89XzcNvoB9CVu8Trd2V/k PPWQpI18ZPdXAlwauj9i/r0pJBOGwF/pOKBWM27HbY5/sBk0FOqtan5JiyNG5wtKcQfF j4UbfAWPsh++w6wEzkSO+X2IIjELXkeV4vEW7aMjH/WbGJ/Mz/zYAQATDc/9qvoieWX7 XT1mjBIF7pFMm4lkCZ+rGuwT+8ZnDwI5ZOL61HJ5EeAdV/DPmWbXH3peuLwEvWEH9sVm 0HSxe8oQkkGyo4uI/kK30K+4BBQ25QT+TFSXLIhTQ70MAlMiKoHr/1nrShuk807pMef1 GFPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t6si744218ejs.64.2020.04.20.20.43.29; Mon, 20 Apr 2020 20:43:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728462AbgDUDlu (ORCPT + 99 others); Mon, 20 Apr 2020 23:41:50 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57284 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728083AbgDUDlu (ORCPT ); Mon, 20 Apr 2020 23:41:50 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id DBD42B06E42AC79A7AF9; Tue, 21 Apr 2020 11:41:47 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Tue, 21 Apr 2020 11:41:41 +0800 From: Jason Yan To: , , , , , , , CC: Jason Yan Subject: [PATCH] scsi: megaraid: use true,false for bool variables Date: Tue, 21 Apr 2020 11:41:11 +0800 Message-ID: <20200421034111.28353-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: drivers/scsi/megaraid/megaraid_sas_fusion.c:4242:6-16: WARNING: Assignment of 0/1 to bool variable drivers/scsi/megaraid/megaraid_sas_fusion.c:4786:1-29: WARNING: Assignment of 0/1 to bool variable drivers/scsi/megaraid/megaraid_sas_fusion.c:4791:1-29: WARNING: Assignment of 0/1 to bool variable drivers/scsi/megaraid/megaraid_sas_fusion.c:4716:1-29: WARNING: Assignment of 0/1 to bool variable drivers/scsi/megaraid/megaraid_sas_fusion.c:4721:1-29: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index bec3d4cca74f..e0f923b8cc50 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -4239,7 +4239,7 @@ static void megasas_refire_mgmt_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd_mfi; union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc; u16 smid; - bool refire_cmd = 0; + bool refire_cmd = false; u8 result; u32 opcode = 0; @@ -4713,12 +4713,12 @@ int megasas_task_abort_fusion(struct scsi_cmnd *scmd) "attempting task abort! scmd(0x%p) tm_dev_handle 0x%x\n", scmd, devhandle); - mr_device_priv_data->tm_busy = 1; + mr_device_priv_data->tm_busy = true; ret = megasas_issue_tm(instance, devhandle, scmd->device->channel, scmd->device->id, smid, MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK, mr_device_priv_data); - mr_device_priv_data->tm_busy = 0; + mr_device_priv_data->tm_busy = false; mutex_unlock(&instance->reset_mutex); scmd_printk(KERN_INFO, scmd, "task abort %s!! scmd(0x%p)\n", @@ -4783,12 +4783,12 @@ int megasas_reset_target_fusion(struct scsi_cmnd *scmd) sdev_printk(KERN_INFO, scmd->device, "attempting target reset! scmd(0x%p) tm_dev_handle: 0x%x\n", scmd, devhandle); - mr_device_priv_data->tm_busy = 1; + mr_device_priv_data->tm_busy = true; ret = megasas_issue_tm(instance, devhandle, scmd->device->channel, scmd->device->id, 0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, mr_device_priv_data); - mr_device_priv_data->tm_busy = 0; + mr_device_priv_data->tm_busy = false; mutex_unlock(&instance->reset_mutex); scmd_printk(KERN_NOTICE, scmd, "target reset %s!!\n", (ret == SUCCESS) ? "SUCCESS" : "FAILED"); -- 2.21.1