Commit 1a5d1d94 authored by Jason Yan's avatar Jason Yan Committed by Martin K. Petersen

scsi: megaraid: Use true, false for bool variables

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

Link: https://lore.kernel.org/r/20200421034111.28353-1-yanaijie@huawei.comAcked-by: default avatarChandrakanth Patil <chandrakanth.patil@broadcom.com>
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ce4c4306
...@@ -4239,7 +4239,7 @@ static void megasas_refire_mgmt_cmd(struct megasas_instance *instance, ...@@ -4239,7 +4239,7 @@ static void megasas_refire_mgmt_cmd(struct megasas_instance *instance,
struct megasas_cmd *cmd_mfi; struct megasas_cmd *cmd_mfi;
union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc; union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc;
u16 smid; u16 smid;
bool refire_cmd = 0; bool refire_cmd = false;
u8 result; u8 result;
u32 opcode = 0; u32 opcode = 0;
...@@ -4713,12 +4713,12 @@ int megasas_task_abort_fusion(struct scsi_cmnd *scmd) ...@@ -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", "attempting task abort! scmd(0x%p) tm_dev_handle 0x%x\n",
scmd, devhandle); scmd, devhandle);
mr_device_priv_data->tm_busy = 1; mr_device_priv_data->tm_busy = true;
ret = megasas_issue_tm(instance, devhandle, ret = megasas_issue_tm(instance, devhandle,
scmd->device->channel, scmd->device->id, smid, scmd->device->channel, scmd->device->id, smid,
MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK, MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK,
mr_device_priv_data); mr_device_priv_data);
mr_device_priv_data->tm_busy = 0; mr_device_priv_data->tm_busy = false;
mutex_unlock(&instance->reset_mutex); mutex_unlock(&instance->reset_mutex);
scmd_printk(KERN_INFO, scmd, "task abort %s!! scmd(0x%p)\n", 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) ...@@ -4783,12 +4783,12 @@ int megasas_reset_target_fusion(struct scsi_cmnd *scmd)
sdev_printk(KERN_INFO, scmd->device, sdev_printk(KERN_INFO, scmd->device,
"attempting target reset! scmd(0x%p) tm_dev_handle: 0x%x\n", "attempting target reset! scmd(0x%p) tm_dev_handle: 0x%x\n",
scmd, devhandle); scmd, devhandle);
mr_device_priv_data->tm_busy = 1; mr_device_priv_data->tm_busy = true;
ret = megasas_issue_tm(instance, devhandle, ret = megasas_issue_tm(instance, devhandle,
scmd->device->channel, scmd->device->id, 0, scmd->device->channel, scmd->device->id, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
mr_device_priv_data); mr_device_priv_data);
mr_device_priv_data->tm_busy = 0; mr_device_priv_data->tm_busy = false;
mutex_unlock(&instance->reset_mutex); mutex_unlock(&instance->reset_mutex);
scmd_printk(KERN_NOTICE, scmd, "target reset %s!!\n", scmd_printk(KERN_NOTICE, scmd, "target reset %s!!\n",
(ret == SUCCESS) ? "SUCCESS" : "FAILED"); (ret == SUCCESS) ? "SUCCESS" : "FAILED");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment