From patchwork Tue Oct 24 15:51:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 116963 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5915067qgn; Tue, 24 Oct 2017 08:07:33 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SVetEu9QNaktiz3+OoCnbh1SL+qVcnPtbTw1g4tY5x3mVbOL+NTKKj+sSSbgbBplj9Lp9k X-Received: by 10.101.69.74 with SMTP id x10mr15038972pgr.294.1508857653856; Tue, 24 Oct 2017 08:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508857653; cv=none; d=google.com; s=arc-20160816; b=biOkFXpVyREzzJ35BRxCLAVZ3Zw299jGesT0AEb3Li1IcK/hgTnfY1mz6at1gNf8lc WJQ112se9cdRJhKhyUn4ushGNIHVUMP1FuZA+TSoGPA1kWWd4WVI6qziKpobj3snJXP8 2VufBjwWxQ66Hsq8W74AJCl4nbRHWhdeWLQrmKql/C3eZYIabChxezCmImFOXdnMP61t I27J8/d6l0dug8+W4AVK/ug6ULjYtg4NbhpACVAlJhlkEmif71Qc9XG9eboj4E1mWbFg m7ishxbYlDnoozP/j4O5Uu3zWoA2c4phap3v7rkpuVs8yXVFERs28/4sZj/5hkqUGEeV 1p2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=2M2yNGnX9cftpytvY1miHogAdzl4SoLju96q61an7j4=; b=bgzsVe0EOI2oHVkJkO2leHubmskKazLA3q7q8efd/sPAPb1Vpu1ssTr/79WM/ahIhz 5zzSwd7VELdMZRTfWgxpxOi1QuwLfmFPR9WFm6e/SdKv5ysOfrKBvbcofyGXJ4R/3Eow CbQ0bAgoogy5ZTxLAPmT1vzBw6+JqujUsbMs1WGIcF+o9pK28oIxC/8Knx+Ey+jAzuzI 7ogtuvoq0a7Wr2n136t/Cr+rSS2wrgns/GdklsW+qxTZWCxPKoyZVYXlOBKLnHHEpDzW NHfhiUAAa+p+7QYDLATsyTS19iJb6fL9A4x/aqEKb4cgN0H4g50r+/gam1tYcHixeB0t LglA== 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 b187si336900pfg.335.2017.10.24.08.07.33; Tue, 24 Oct 2017 08:07:33 -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 S932416AbdJXPHc (ORCPT + 27 others); Tue, 24 Oct 2017 11:07:32 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:50507 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751343AbdJXPF2 (ORCPT ); Tue, 24 Oct 2017 11:05:28 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D8FD8A0941C46; Tue, 24 Oct 2017 23:05:22 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.361.1; Tue, 24 Oct 2017 23:05:15 +0800 From: John Garry To: , CC: , , , , Xiang Chen , John Garry Subject: [PATCH 01/19] scsi: hisi_sas: delete get_ncq_tag_v3_hw() Date: Tue, 24 Oct 2017 23:51:31 +0800 Message-ID: <1508860309-212397-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508860309-212397-1-git-send-email-john.garry@huawei.com> References: <1508860309-212397-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen We already relocated hisi_sas_get_ncq_tag() into common file main.c, so delete get_ncq_tag_v3_hw() and use hisi_sas_get_ncq_tag() instead. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 2e5fa97..d60501f 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -988,20 +988,6 @@ static int prep_smp_v3_hw(struct hisi_hba *hisi_hba, return rc; } -static int get_ncq_tag_v3_hw(struct sas_task *task, u32 *tag) -{ - struct ata_queued_cmd *qc = task->uldd_task; - - if (qc) { - if (qc->tf.command == ATA_CMD_FPDMA_WRITE || - qc->tf.command == ATA_CMD_FPDMA_READ) { - *tag = qc->tag; - return 1; - } - } - return 0; -} - static int prep_ata_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) { @@ -1050,7 +1036,7 @@ static int prep_ata_v3_hw(struct hisi_hba *hisi_hba, hdr->dw1 = cpu_to_le32(dw1); /* dw2 */ - if (task->ata_task.use_ncq && get_ncq_tag_v3_hw(task, &hdr_tag)) { + if (task->ata_task.use_ncq && hisi_sas_get_ncq_tag(task, &hdr_tag)) { task->ata_task.fis.sector_count |= (u8) (hdr_tag << 3); dw2 |= hdr_tag << CMD_HDR_NCQ_TAG_OFF; }