Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp492060imm; Thu, 5 Jul 2018 04:02:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfYR9+PBI3RuvAK3FIyh9V5fxwE+/WVTpzFOZyquoofT/yUA7KrW5Fm4woaSl4VZHRj+eHG X-Received: by 2002:a63:5c10:: with SMTP id q16-v6mr5135531pgb.452.1530788571411; Thu, 05 Jul 2018 04:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530788571; cv=none; d=google.com; s=arc-20160816; b=J/9CRH8RTNoTgzEkL0PQjrnxP1G46yyHGw4XW4AABXo6DVBE3h1J2k3lxB5uzRsQOB I++fyJH+W6TvZm627aVIZnWRL6khVkSp6KwHAM2t5NvIwaASvtVoZykCS6L6UbEde6Ji sUfKM3PLMN7MOHQgq35FyTZbGofYy6jy06F08AXvVmqVqgTKnOhan5atHsGPutm7Nxig GqeaLXtsyfDXHLGKb5+6pZVCS6QTlHV6wpGJVZGHrhMFdijWD+fs+u/ybRfjJaiGkyP4 jHCFzOscNMSDkrDZbr+c5RoMADE8O750LXO2+UQ/3BTacn95Up7Ljh0T7n0ZwMhCYQVS pVDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=TkTABXSbPg51TkrBv5CuHW9kUADiwzeQdaxdFgLsJVs=; b=FWuKTEBiewFHsbRhqYioVDrK0Wt5YUMJsvGgSl5ELYcPyhIbTidP/gGdi1bcRZD/5x 1ePWIOlkcer+aOJ8NKOG9GnrWBYNlLwCRCcQDJRp9h18SrpQu/ziefEs1H4Hpyr9P7pd 1N7JMkaAArgfxBhQfVng/2MW7H3CbQ0txwcR1xagO63rSg+0nQ4UFXRr1F4sn97JAecO O18+feIA6q56hKq9d2UzzDowync+lLV4QZt6+HqJO7gwo6wJLL+N2B2rteuiP9qGHLzC fa3+/eDP2oElJseOwmyg3yFn/fHdn4HGVRXn5e+M+mxZZIU2IqxOFF1VzgUMao88NZKf AXOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q129-v6si5343713pga.217.2018.07.05.04.02.29; Thu, 05 Jul 2018 04:02:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753883AbeGELBs (ORCPT + 99 others); Thu, 5 Jul 2018 07:01:48 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } } -- 2.16.4