linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>,
	Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH 4/4] scsi: ncr53c8xx: remove ScsiResult macro
Date: Thu,  5 Jul 2018 13:01:40 +0200	[thread overview]
Message-ID: <20180705110140.19545-5-jthumshirn@suse.de> (raw)
In-Reply-To: <20180705110140.19545-1-jthumshirn@suse.de>

Remove the ScsiResult macro and open code it on all call sites.

This will make subsequent refactoring in this area easier.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/ncr53c8xx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index dc4e801b2cef..6cd3e289ef99 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -4611,7 +4611,7 @@ static int ncr_reset_bus (struct ncb *np, struct scsi_cmnd *cmd, int sync_reset)
  * in order to keep it alive.
  */
 	if (!found && sync_reset && !retrieve_from_waiting_list(0, np, cmd)) {
-		cmd->result = ScsiResult(DID_RESET, 0);
+		cmd->result = DID_RESET << 16;
 		ncr_queue_done_cmd(np, cmd);
 	}
 
@@ -4957,7 +4957,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp)
 		/*
 		**   Check condition code
 		*/
-		cmd->result = ScsiResult(DID_OK, S_CHECK_COND);
+		cmd->result = DID_OK << 16 | S_CHECK_COND;
 
 		/*
 		**	Copy back sense data to caller's buffer.
@@ -4978,7 +4978,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp)
 		/*
 		**   Reservation Conflict condition code
 		*/
-		cmd->result = ScsiResult(DID_OK, S_CONFLICT);
+		cmd->result = DID_OK << 16 | S_CONFLICT;
 	
 	} else if ((cp->host_status == HS_COMPLETE)
 		&& (cp->scsi_status == S_BUSY ||
@@ -8043,7 +8043,7 @@ printk("ncr53c8xx_queue_command\n");
      spin_lock_irqsave(&np->smp_lock, flags);
 
      if ((sts = ncr_queue_command(np, cmd)) != DID_OK) {
-	  cmd->result = ScsiResult(sts, 0);
+	  cmd->result = sts << 16;
 #ifdef DEBUG_NCR53C8XX
 printk("ncr53c8xx : command not queued - result=%d\n", sts);
 #endif
@@ -8234,7 +8234,7 @@ static void process_waiting_list(struct ncb *np, int sts)
 #ifdef DEBUG_WAITING_LIST
 	printk("%s: cmd %lx done forced sts=%d\n", ncr_name(np), (u_long) wcmd, sts);
 #endif
-			wcmd->result = ScsiResult(sts, 0);
+			wcmd->result = sts << 16;
 			ncr_queue_done_cmd(np, wcmd);
 		}
 	}
-- 
2.16.4

  parent reply	other threads:[~2018-07-05 11:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 11:01 [PATCH 0/4] SCSI results rework preparation part 2 Johannes Thumshirn
2018-07-05 11:01 ` [PATCH 1/4] scsi: aacraid: remove AAC_STAT_GOOD define Johannes Thumshirn
2018-07-05 17:24   ` Bart Van Assche
2018-07-06  8:04     ` Johannes Thumshirn
2018-07-06 17:01       ` Bart Van Assche
2018-07-05 17:42   ` Dave Carroll
2018-07-05 17:49     ` Bart Van Assche
2018-07-06  8:03     ` Johannes Thumshirn
2018-07-06 16:55       ` Dave Carroll
2018-07-05 11:01 ` [PATCH 2/4] scsi: bfa: remove ScsiResult macro Johannes Thumshirn
2018-07-05 17:00   ` Bart Van Assche
2018-07-06  8:08     ` Johannes Thumshirn
2018-07-05 11:01 ` [PATCH 3/4] scsi: lpfc: " Johannes Thumshirn
2018-07-05 17:02   ` Bart Van Assche
2018-07-05 11:01 ` Johannes Thumshirn [this message]
2018-07-05 17:04   ` [PATCH 4/4] scsi: ncr53c8xx: " Bart Van Assche
2018-07-06  8:09     ` Johannes Thumshirn
2018-07-06 17:05       ` Bart Van Assche
2018-07-09  7:15         ` Johannes Thumshirn
2018-07-11  2:53 ` [PATCH 0/4] SCSI results rework preparation part 2 Martin K. Petersen

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=20180705110140.19545-5-jthumshirn@suse.de \
    --to=jthumshirn@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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).