linux-scsi.vger.kernel.org archive mirror
 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 11/23] advansys: Make AscIsrChipHalted() a void function
Date: Fri, 24 Apr 2015 13:18:30 +0200	[thread overview]
Message-ID: <1429874322-85488-13-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1429874322-85488-1-git-send-email-hare@suse.de>

AscIsrChipHalted will only ever return '0', so make it
a void function.

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

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 35fc291..23a4a7d 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -6440,7 +6440,7 @@ static void AscSetChipSDTR(PortAddr iop_base, uchar sdtr_data, uchar tid_no)
 	AscPutMCodeSDTRDoneAtID(iop_base, tid_no, sdtr_data);
 }
 
-static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
+static void AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 {
 	EXT_MSG ext_msg;
 	EXT_MSG out_msg;
@@ -6487,14 +6487,14 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 			boardp->sdtr_data[tid_no] = 0;
 		}
 		AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-		return (0);
+		return;
 	} else if (int_halt_code == ASC_HALT_ENABLE_ASYN_USE_SYN_FIX) {
 		if (asc_dvc->pci_fix_asyn_xfer & target_id) {
 			AscSetChipSDTR(iop_base, asyn_sdtr, tid_no);
 			boardp->sdtr_data[tid_no] = asyn_sdtr;
 		}
 		AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-		return (0);
+		return;
 	} else if (int_halt_code == ASC_HALT_EXTMSG_IN) {
 		AscMemWordCopyPtrFromLram(iop_base,
 					  ASCV_MSGIN_BEG,
@@ -6580,7 +6580,7 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 						  (ushort)ASC_SCSIQ_B_CNTL),
 					 q_cntl);
 			AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-			return (0);
+			return;
 		} else if (ext_msg.msg_type == EXTENDED_MESSAGE &&
 			   ext_msg.msg_req == EXTENDED_WDTR &&
 			   ext_msg.msg_len == MS_WDTR_LEN) {
@@ -6596,7 +6596,7 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 						  (ushort)ASC_SCSIQ_B_CNTL),
 					 q_cntl);
 			AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-			return (0);
+			return;
 		} else {
 
 			ext_msg.msg_type = MESSAGE_REJECT;
@@ -6610,7 +6610,7 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 						  (ushort)ASC_SCSIQ_B_CNTL),
 					 q_cntl);
 			AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-			return (0);
+			return;
 		}
 	} else if (int_halt_code == ASC_HALT_CHK_CONDITION) {
 
@@ -6667,7 +6667,7 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 		AscWriteLramByte(iop_base, (ushort)ASCV_SCSIBUSY_B, scsi_busy);
 
 		AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-		return (0);
+		return;
 	} else if (int_halt_code == ASC_HALT_SDTR_REJECTED) {
 
 		AscMemWordCopyPtrFromLram(iop_base,
@@ -6689,7 +6689,7 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 				 (ushort)(halt_q_addr +
 					  (ushort)ASC_SCSIQ_B_CNTL), q_cntl);
 		AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-		return (0);
+		return;
 	} else if (int_halt_code == ASC_HALT_SS_QUEUE_FULL) {
 
 		scsi_status = AscReadLramByte(iop_base,
@@ -6734,7 +6734,7 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 			}
 		}
 		AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-		return (0);
+		return;
 	}
 #if CC_VERY_LONG_SG_LIST
 	else if (int_halt_code == ASC_HALT_HOST_COPY_SG_LIST_TO_RISC) {
@@ -6890,10 +6890,10 @@ static int AscIsrChipHalted(ASC_DVC_VAR *asc_dvc)
 		 * after the return.
 		 */
 		AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
-		return (0);
+		return;
 	}
 #endif /* CC_VERY_LONG_SG_LIST */
-	return (0);
+	return;
 }
 
 /*
@@ -7306,13 +7306,9 @@ 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) == ASC_ERROR) {
-				goto ISR_REPORT_QDONE_FATAL_ERROR;
-			} else {
-				saved_ctrl_reg &= (uchar)(~CC_HALT);
-			}
+			AscIsrChipHalted(asc_dvc);
+			saved_ctrl_reg &= (uchar)(~CC_HALT);
 		} else {
- ISR_REPORT_QDONE_FATAL_ERROR:
 			if ((asc_dvc->dvc_cntl & ASC_CNTL_INT_MULTI_Q) != 0) {
 				while (((status =
 					 AscIsrQDone(asc_dvc)) & 0x01) != 0) {
-- 
1.8.5.2


  parent reply	other threads:[~2015-04-24 11:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 11:18 [PATCHv3 00/23] Nobody loves the advansys driver Hannes Reinecke
2015-04-24 11:18 ` [PATCH 1/2] advansys: Update to version 3.5 and remove compilation warning Hannes Reinecke
2015-04-24 11:19   ` Hannes Reinecke
2015-04-24 11:18 ` [PATCH 01/23] advansys: use host_reset Hannes Reinecke
2015-04-24 11:18 ` [PATCH 02/23] advansys: use shared host tag map for command lookup Hannes Reinecke
2015-04-24 11:18 ` [PATCH 03/23] advansys: use DMA-API for mapping sense buffer Hannes Reinecke
2015-04-24 11:18 ` [PATCH 04/23] advansys: Use DMA-API for carrier buffer Hannes Reinecke
2015-04-24 11:18 ` [PATCH 05/23] advansys: Use DMA-API for mapping request blocks Hannes Reinecke
2015-04-24 11:18 ` [PATCH 06/23] advansys: Use dma_pool for sg elements Hannes Reinecke
2015-04-24 11:18 ` [PATCH 07/23] advansys: use 'bool' instead of 'int' Hannes Reinecke
2015-04-24 11:18 ` [PATCH 08/23] advansys: use standard data types Hannes Reinecke
2015-04-24 11:18 ` [PATCH 09/23] advansys: Remove 'TRUE' and 'FALSE' definitions Hannes Reinecke
2015-04-24 11:18 ` [PATCH 10/23] advansys: remove 'ERR' definition Hannes Reinecke
2015-04-24 11:18 ` Hannes Reinecke [this message]
2015-04-24 11:18 ` [PATCH 12/23] advansys: cleanup function return codes Hannes Reinecke
2015-04-24 11:18 ` [PATCH 13/23] advansys: scsi_q1->data_addr is little endian Hannes Reinecke
2015-04-24 11:18 ` [PATCH 14/23] advansys: Remove ASC_SCSI_REQ_Q Hannes Reinecke
2015-04-24 11:18 ` [PATCH 15/23] advansys: Remove CC_VERY_LONG_SG_LIST Hannes Reinecke
2015-04-24 11:18 ` [PATCH 16/23] advansys: rename 'ASC_RQ_XX' to 'ADV_RQ_XX' Hannes Reinecke
2015-04-24 11:18 ` [PATCH 17/23] advansys: Remove 'a_flag' Hannes Reinecke
2015-04-24 11:18 ` [PATCH 18/23] advansys: Remove obsolete virtual memory mapping comment Hannes Reinecke
2015-04-24 11:18 ` [PATCH 19/23] advansys: Remove cmd_per_lun setting Hannes Reinecke
2015-04-26 14:57   ` Ondrej Zary
2015-04-26 16:55     ` Christoph Hellwig
2015-04-26 18:23       ` Ondrej Zary
2015-04-26 18:52     ` James Bottomley
2015-04-27  7:02       ` Hannes Reinecke
2015-04-28 21:15         ` James Bottomley
2015-04-24 11:18 ` [PATCH 20/23] advansys: Check for DMA mapping errors Hannes Reinecke
2015-04-24 11:18 ` [PATCH 21/23] advansys: use spin_lock_irqsave() in interrupt handler Hannes Reinecke
2015-04-24 11:18 ` [PATCH 22/23] advansys: Remove call to dma_cache_sync() Hannes Reinecke
2015-04-24 11:18 ` [PATCH 23/23] advansys: Update to version 3.5 and remove compilation warning 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=1429874322-85488-13-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).