From patchwork Thu Jul 5 11:01:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 10508607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3D9B860116 for ; Thu, 5 Jul 2018 11:02:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DB40205F8 for ; Thu, 5 Jul 2018 11:02:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20A8528ED0; Thu, 5 Jul 2018 11:02:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09A07205F8 for ; Thu, 5 Jul 2018 11:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753639AbeGELBq (ORCPT ); Thu, 5 Jul 2018 07:01:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:59896 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753602AbeGELBo (ORCPT ); Thu, 5 Jul 2018 07:01:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 35C68AFAA; Thu, 5 Jul 2018 11:01:43 +0000 (UTC) From: Johannes Thumshirn To: "Martin K . Petersen" Cc: Linux Kernel Mailinglist , Linux SCSI Mailinglist , Johannes Thumshirn Subject: [PATCH 4/4] scsi: ncr53c8xx: remove ScsiResult macro Date: Thu, 5 Jul 2018 13:01:40 +0200 Message-Id: <20180705110140.19545-5-jthumshirn@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180705110140.19545-1-jthumshirn@suse.de> References: <20180705110140.19545-1-jthumshirn@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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); } }