All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Ondrey Zary <linux@rainbow-software.org>,
	Doug Gilberg <dgilbert@interlog.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 10/22] advansys: remove 'ERR' definition
Date: Fri, 24 Apr 2015 10:32:45 +0200	[thread overview]
Message-ID: <1429864377-67002-11-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1429864377-67002-1-git-send-email-hare@suse.de>

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/advansys.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 9482d4e..9d78faa 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -78,7 +78,6 @@
 
 typedef unsigned char uchar;
 
-#define ERR      (-1)
 #define UW_ERR   (uint)(0xFFFF)
 #define isodd_word(val)   ((((uint)val) & (uint)0x0001) != 0)
 
@@ -7307,7 +7306,7 @@ static int AscISR(ASC_DVC_VAR *asc_dvc)
 		AscAckInterrupt(iop_base);
 		int_pending = ASC_TRUE;
 		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;
 			} else {
 				saved_ctrl_reg &= (uchar)(~CC_HALT);
@@ -8439,7 +8438,7 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
 	iop_base = asc_dvc->iop_base;
 	sg_head = scsiq->sg_head;
 	if (asc_dvc->err_code != 0)
-		return (ERR);
+		return ASC_ERROR;
 	scsiq->q1.q_no = 0;
 	if ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0) {
 		scsiq->q1.extra_bytes = 0;
@@ -8465,18 +8464,18 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
 	}
 	if (asc_dvc->in_critical_cnt != 0) {
 		AscSetLibErrorCode(asc_dvc, ASCQ_ERR_CRITICAL_RE_ENTRY);
-		return (ERR);
+		return ASC_ERROR;
 	}
 	asc_dvc->in_critical_cnt++;
 	if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) {
 		if ((sg_entry_cnt = sg_head->entry_cnt) == 0) {
 			asc_dvc->in_critical_cnt--;
-			return (ERR);
+			return ASC_ERROR;
 		}
 #if !CC_VERY_LONG_SG_LIST
 		if (sg_entry_cnt > ASC_MAX_SG_LIST) {
 			asc_dvc->in_critical_cnt--;
-			return (ERR);
+			return ASC_ERROR;
 		}
 #endif /* !CC_VERY_LONG_SG_LIST */
 		if (sg_entry_cnt == 1) {
-- 
1.8.5.2


  parent reply	other threads:[~2015-04-24  8:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24  8:32 [PATCHv2 00/22] Nobody loves the advansys driver Hannes Reinecke
2015-04-24  8:32 ` [PATCH 01/22] advansys: use host_reset Hannes Reinecke
2015-04-24  8:32 ` [PATCH 02/22] advansys: use shared host tag map for command lookup Hannes Reinecke
2015-04-24  8:32 ` [PATCH 03/22] advansys: use DMA-API for mapping sense buffer Hannes Reinecke
2015-04-24  8:32 ` [PATCH 04/22] advansys: Use DMA-API for carrier buffer Hannes Reinecke
2015-04-24  8:32 ` [PATCH 05/22] advansys: Use DMA-API for mapping request blocks Hannes Reinecke
2015-04-24  8:32 ` [PATCH 06/22] advansys: Use dma_pool for sg elements Hannes Reinecke
2015-04-24  8:32 ` [PATCH 07/22] advansys: use 'bool' instead of 'int' Hannes Reinecke
2015-04-24  8:32 ` [PATCH 08/22] advansys: use standard data types Hannes Reinecke
2015-04-24  8:32 ` [PATCH 09/22] advansys: Remove 'TRUE' and 'FALSE' definitions Hannes Reinecke
2015-04-24  8:32 ` Hannes Reinecke [this message]
2015-04-24  8:32 ` [PATCH 11/22] advansys: Make AscIsrChipHalted() a void function Hannes Reinecke
2015-04-24  8:32 ` [PATCH 12/22] advansys: cleanup function return codes Hannes Reinecke
2015-04-24  8:32 ` [PATCH 13/22] advansys: scsi_q1->data_addr is little endian Hannes Reinecke
2015-04-24  8:32 ` [PATCH 14/22] advansys: Remove ASC_SCSI_REQ_Q Hannes Reinecke
2015-04-24  8:32 ` [PATCH 15/22] advansys: Remove CC_VERY_LONG_SG_LIST Hannes Reinecke
2015-04-24  8:32 ` [PATCH 16/22] advansys: rename 'ASC_RQ_XX' to 'ADV_RQ_XX' Hannes Reinecke
2015-04-24  8:32 ` [PATCH 17/22] advansys: Remove 'a_flag' Hannes Reinecke
2015-04-24  8:32 ` [PATCH 18/22] advansys: Remove obsolete virtual memory mapping comment Hannes Reinecke
2015-04-24  8:32 ` [PATCH 19/22] advansys: Remove comment around cmd_per_lun Hannes Reinecke
2015-04-24  9:41   ` Christoph Hellwig
2015-04-24  9:47     ` Hannes Reinecke
2015-04-24  8:32 ` [PATCH 20/22] advansys: Check for DMA mapping errors Hannes Reinecke
2015-04-24  8:32 ` [PATCH 21/22] advansys: use spin_lock_irqsave() in interrupt handler Hannes Reinecke
2015-04-24  8:32 ` [PATCH 22/22] advansys: Update to version 3.5 and remove compilation warning Hannes Reinecke
2015-04-24  9:42   ` Christoph Hellwig
2015-04-24  9:47     ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429864377-67002-11-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=dgilbert@interlog.com \
    --cc=hch@lst.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.