advansys: remove 'ERR' definition

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:
Hannes Reinecke 2015-04-24 13:18:29 +02:00 committed by James Bottomley
parent ae26759e1c
commit f1138a84a3

View File

@ -78,7 +78,6 @@
typedef unsigned char uchar; typedef unsigned char uchar;
#define ERR (-1)
#define UW_ERR (uint)(0xFFFF) #define UW_ERR (uint)(0xFFFF)
#define isodd_word(val) ((((uint)val) & (uint)0x0001) != 0) #define isodd_word(val) ((((uint)val) & (uint)0x0001) != 0)
@ -7307,7 +7306,7 @@ static int AscISR(ASC_DVC_VAR *asc_dvc)
AscAckInterrupt(iop_base); AscAckInterrupt(iop_base);
int_pending = ASC_TRUE; int_pending = ASC_TRUE;
if ((chipstat & CSW_HALTED) && (ctrl_reg & CC_SINGLE_STEP)) { if ((chipstat & CSW_HALTED) && (ctrl_reg & CC_SINGLE_STEP)) {
if (AscIsrChipHalted(asc_dvc) == ERR) { if (AscIsrChipHalted(asc_dvc) == ASC_ERROR) {
goto ISR_REPORT_QDONE_FATAL_ERROR; goto ISR_REPORT_QDONE_FATAL_ERROR;
} else { } else {
saved_ctrl_reg &= (uchar)(~CC_HALT); saved_ctrl_reg &= (uchar)(~CC_HALT);
@ -8437,7 +8436,7 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
iop_base = asc_dvc->iop_base; iop_base = asc_dvc->iop_base;
sg_head = scsiq->sg_head; sg_head = scsiq->sg_head;
if (asc_dvc->err_code != 0) if (asc_dvc->err_code != 0)
return (ERR); return ASC_ERROR;
scsiq->q1.q_no = 0; scsiq->q1.q_no = 0;
if ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0) { if ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0) {
scsiq->q1.extra_bytes = 0; scsiq->q1.extra_bytes = 0;
@ -8463,18 +8462,18 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
} }
if (asc_dvc->in_critical_cnt != 0) { if (asc_dvc->in_critical_cnt != 0) {
AscSetLibErrorCode(asc_dvc, ASCQ_ERR_CRITICAL_RE_ENTRY); AscSetLibErrorCode(asc_dvc, ASCQ_ERR_CRITICAL_RE_ENTRY);
return (ERR); return ASC_ERROR;
} }
asc_dvc->in_critical_cnt++; asc_dvc->in_critical_cnt++;
if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) { if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) {
if ((sg_entry_cnt = sg_head->entry_cnt) == 0) { if ((sg_entry_cnt = sg_head->entry_cnt) == 0) {
asc_dvc->in_critical_cnt--; asc_dvc->in_critical_cnt--;
return (ERR); return ASC_ERROR;
} }
#if !CC_VERY_LONG_SG_LIST #if !CC_VERY_LONG_SG_LIST
if (sg_entry_cnt > ASC_MAX_SG_LIST) { if (sg_entry_cnt > ASC_MAX_SG_LIST) {
asc_dvc->in_critical_cnt--; asc_dvc->in_critical_cnt--;
return (ERR); return ASC_ERROR;
} }
#endif /* !CC_VERY_LONG_SG_LIST */ #endif /* !CC_VERY_LONG_SG_LIST */
if (sg_entry_cnt == 1) { if (sg_entry_cnt == 1) {