Commit c4858224 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: ips: Use true and false instead of TRUE and FALSE

This patch prepares for removal of the drivers/scsi/scsi.h header file.
That header file defines the 'TRUE' and 'FALSE' constants.

Link: https://lore.kernel.org/r/20220218195117.25689-4-bvanassche@acm.org
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: John Garry <john.garry@huawei.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent be33e2f8
...@@ -945,7 +945,7 @@ static int __ips_eh_reset(struct scsi_cmnd *SC) ...@@ -945,7 +945,7 @@ static int __ips_eh_reset(struct scsi_cmnd *SC)
scsi_done(scsi_cmd); scsi_done(scsi_cmd);
} }
ha->active = FALSE; ha->active = false;
return (FAILED); return (FAILED);
} }
...@@ -974,7 +974,7 @@ static int __ips_eh_reset(struct scsi_cmnd *SC) ...@@ -974,7 +974,7 @@ static int __ips_eh_reset(struct scsi_cmnd *SC)
scsi_done(scsi_cmd); scsi_done(scsi_cmd);
} }
ha->active = FALSE; ha->active = false;
return (FAILED); return (FAILED);
} }
...@@ -1287,7 +1287,7 @@ ips_intr_copperhead(ips_ha_t * ha) ...@@ -1287,7 +1287,7 @@ ips_intr_copperhead(ips_ha_t * ha)
return 0; return 0;
} }
while (TRUE) { while (true) {
sp = &ha->sp; sp = &ha->sp;
intrstatus = (*ha->func.isintr) (ha); intrstatus = (*ha->func.isintr) (ha);
...@@ -1351,7 +1351,7 @@ ips_intr_morpheus(ips_ha_t * ha) ...@@ -1351,7 +1351,7 @@ ips_intr_morpheus(ips_ha_t * ha)
return 0; return 0;
} }
while (TRUE) { while (true) {
sp = &ha->sp; sp = &ha->sp;
intrstatus = (*ha->func.isintr) (ha); intrstatus = (*ha->func.isintr) (ha);
...@@ -3086,8 +3086,8 @@ ipsintr_blocking(ips_ha_t * ha, ips_scb_t * scb) ...@@ -3086,8 +3086,8 @@ ipsintr_blocking(ips_ha_t * ha, ips_scb_t * scb)
METHOD_TRACE("ipsintr_blocking", 2); METHOD_TRACE("ipsintr_blocking", 2);
ips_freescb(ha, scb); ips_freescb(ha, scb);
if ((ha->waitflag == TRUE) && (ha->cmd_in_progress == scb->cdb[0])) { if (ha->waitflag && ha->cmd_in_progress == scb->cdb[0]) {
ha->waitflag = FALSE; ha->waitflag = false;
return; return;
} }
...@@ -3387,7 +3387,7 @@ ips_send_wait(ips_ha_t * ha, ips_scb_t * scb, int timeout, int intr) ...@@ -3387,7 +3387,7 @@ ips_send_wait(ips_ha_t * ha, ips_scb_t * scb, int timeout, int intr)
METHOD_TRACE("ips_send_wait", 1); METHOD_TRACE("ips_send_wait", 1);
if (intr != IPS_FFDC) { /* Won't be Waiting if this is a Time Stamp */ if (intr != IPS_FFDC) { /* Won't be Waiting if this is a Time Stamp */
ha->waitflag = TRUE; ha->waitflag = true;
ha->cmd_in_progress = scb->cdb[0]; ha->cmd_in_progress = scb->cdb[0];
} }
scb->callback = ipsintr_blocking; scb->callback = ipsintr_blocking;
...@@ -3464,10 +3464,8 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) ...@@ -3464,10 +3464,8 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb)
if (scb->bus > 0) { if (scb->bus > 0) {
/* Controller commands can't be issued */ /* Controller commands can't be issued */
/* to real devices -- fail them */ /* to real devices -- fail them */
if ((ha->waitflag == TRUE) && if (ha->waitflag && ha->cmd_in_progress == scb->cdb[0])
(ha->cmd_in_progress == scb->cdb[0])) { ha->waitflag = false;
ha->waitflag = FALSE;
}
return (1); return (1);
} }
...@@ -4615,7 +4613,7 @@ ips_poll_for_flush_complete(ips_ha_t * ha) ...@@ -4615,7 +4613,7 @@ ips_poll_for_flush_complete(ips_ha_t * ha)
{ {
IPS_STATUS cstatus; IPS_STATUS cstatus;
while (TRUE) { while (true) {
cstatus.value = (*ha->func.statupd) (ha); cstatus.value = (*ha->func.statupd) (ha);
if (cstatus.value == 0xffffffff) /* If No Interrupt to process */ if (cstatus.value == 0xffffffff) /* If No Interrupt to process */
...@@ -5538,26 +5536,26 @@ ips_wait(ips_ha_t * ha, int time, int intr) ...@@ -5538,26 +5536,26 @@ ips_wait(ips_ha_t * ha, int time, int intr)
METHOD_TRACE("ips_wait", 1); METHOD_TRACE("ips_wait", 1);
ret = IPS_FAILURE; ret = IPS_FAILURE;
done = FALSE; done = false;
time *= IPS_ONE_SEC; /* convert seconds */ time *= IPS_ONE_SEC; /* convert seconds */
while ((time > 0) && (!done)) { while ((time > 0) && (!done)) {
if (intr == IPS_INTR_ON) { if (intr == IPS_INTR_ON) {
if (ha->waitflag == FALSE) { if (!ha->waitflag) {
ret = IPS_SUCCESS; ret = IPS_SUCCESS;
done = TRUE; done = true;
break; break;
} }
} else if (intr == IPS_INTR_IORL) { } else if (intr == IPS_INTR_IORL) {
if (ha->waitflag == FALSE) { if (!ha->waitflag) {
/* /*
* controller generated an interrupt to * controller generated an interrupt to
* acknowledge completion of the command * acknowledge completion of the command
* and ips_intr() has serviced the interrupt. * and ips_intr() has serviced the interrupt.
*/ */
ret = IPS_SUCCESS; ret = IPS_SUCCESS;
done = TRUE; done = true;
break; break;
} }
...@@ -5592,7 +5590,7 @@ ips_write_driver_status(ips_ha_t * ha, int intr) ...@@ -5592,7 +5590,7 @@ ips_write_driver_status(ips_ha_t * ha, int intr)
{ {
METHOD_TRACE("ips_write_driver_status", 1); METHOD_TRACE("ips_write_driver_status", 1);
if (!ips_readwrite_page5(ha, FALSE, intr)) { if (!ips_readwrite_page5(ha, false, intr)) {
IPS_PRINTK(KERN_WARNING, ha->pcidev, IPS_PRINTK(KERN_WARNING, ha->pcidev,
"unable to read NVRAM page 5.\n"); "unable to read NVRAM page 5.\n");
...@@ -5630,7 +5628,7 @@ ips_write_driver_status(ips_ha_t * ha, int intr) ...@@ -5630,7 +5628,7 @@ ips_write_driver_status(ips_ha_t * ha, int intr)
ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */
/* now update the page */ /* now update the page */
if (!ips_readwrite_page5(ha, TRUE, intr)) { if (!ips_readwrite_page5(ha, true, intr)) {
IPS_PRINTK(KERN_WARNING, ha->pcidev, IPS_PRINTK(KERN_WARNING, ha->pcidev,
"unable to write NVRAM page 5.\n"); "unable to write NVRAM page 5.\n");
......
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