From patchwork Mon Feb 19 19:13:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 128837 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3800544ljc; Mon, 19 Feb 2018 10:22:17 -0800 (PST) X-Google-Smtp-Source: AH8x226JlLGHo69KTy/vjHKymWH5m91p0KezxeCVHtbb89a3m1pfrsRypoGKBMjXzh/t4AGsIxUC X-Received: by 10.99.176.15 with SMTP id h15mr13060660pgf.374.1519064537840; Mon, 19 Feb 2018 10:22:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519064537; cv=none; d=google.com; s=arc-20160816; b=A+uIbXJTlk6bIP9DOzNfCXCS4ApA3PKRig4kaCL7gD7Fj0O0bXr1ZmE+hdmV3NVYW6 O4qC0nIXJ3Emcnmy2Auyc+CIAVPwYX/2GF/11786Hwn+rNw6G4TNgrjG8R6rN9B1BjeJ upmPuyf7hIWmruhPdBX/5icxqCFxF8jJTp/oWsMM6D93aeFbkJ0IfpfIIHZggPRLv/GA TWOgdWzjbvms1K6e30ip6CVmsAOVpCX6MdFRYV6w4iBlL4gnp0KNL0CQPPAaNML3ufHX kD0J/+YYrDRc4jKwa+a4AcT+BRzyetKuHot8jGznqB5ccd6cGCdeT0JUC66Eb8L/b1PJ mkzg== 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=8UAzgAWWlizfrbRx3qWOnEynZ3imRD4cJK0Psd/vlFs=; b=mqYhV2pdWoeR1FaXCoVqRCLG+6D89DSsN7wisN9AK12kdflU7wyeg2VQ46+XXwTfzu Yr0P4W+g39k/U29er0AWHwOLOoIKw/7Q8mHp+4RzVSatidNp6/uzjddqFx+f6r+6EHzn l4V6tuQPAZNyO73ln1Mnxyv4mucujec0SsS8j69aHJPLnVySiQiPltAJP0zjwR9gB5t3 Bm8bv6p3nNo8OleUh9LDNHCjZxQSpL7HZN7ct7tEx/kTSL5cTgEWueEJSQJ/9Y8Vk/DA WcHF3K5y4utGy2YxPIfSJtka4zSO1EpgQAnGNAjYWaV8a5zAyCG1HwsCZWFLMSzZ6Var U3ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-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 q15si5521004pgc.727.2018.02.19.10.22.17; Mon, 19 Feb 2018 10:22:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753479AbeBSSWQ (ORCPT + 1 other); Mon, 19 Feb 2018 13:22:16 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5249 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753401AbeBSSWN (ORCPT ); Mon, 19 Feb 2018 13:22:13 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E0D9840621D76; Tue, 20 Feb 2018 02:21:59 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Tue, 20 Feb 2018 02:21:53 +0800 From: John Garry To: , , , CC: , , , , Xiang Chen , John Garry Subject: [PATCH 6/8] scsi: hisi_sas: remove unused variable hisi_sas_devices.running_req Date: Tue, 20 Feb 2018 03:13:29 +0800 Message-ID: <1519067611-206638-7-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519067611-206638-1-git-send-email-john.garry@huawei.com> References: <1519067611-206638-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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Xiang Chen The structure element hisi_sas_devices.running_req to count how many commands are active is in effect only ever written in the code, so remove it. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 - drivers/scsi/hisi_sas/hisi_sas_main.c | 9 --------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 --- 3 files changed, 13 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index e7fd287..d1153e8 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -175,7 +175,6 @@ struct hisi_sas_device { struct hisi_sas_dq *dq; struct list_head list; u64 attached_phy; - atomic64_t running_req; enum sas_device_type dev_type; int device_id; int sata_idx; diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 9ff8790..88ad8d4 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -200,8 +200,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, if (task) { struct device *dev = hisi_hba->dev; - struct domain_device *device = task->dev; - struct hisi_sas_device *sas_dev = device->lldd_dev; if (!task->lldd_task) return; @@ -213,9 +211,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, dma_unmap_sg(dev, task->scatter, task->num_scatter, task->data_dir); - - if (sas_dev) - atomic64_dec(&sas_dev->running_req); } if (slot->buf) @@ -431,8 +426,6 @@ static int hisi_sas_task_prep(struct sas_task *task, struct hisi_sas_dq spin_unlock_irqrestore(&task->task_state_lock, flags); dq->slot_prep = slot; - - atomic64_inc(&sas_dev->running_req); ++(*pass); return 0; @@ -1517,8 +1510,6 @@ static int hisi_sas_query_task(struct sas_task *task) dq->slot_prep = slot; - atomic64_inc(&sas_dev->running_req); - /* send abort command to the chip */ hisi_hba->hw->start_delivery(dq); spin_unlock_irqrestore(&dq->lock, flags_dq); diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 2eb8980..8dd0e6a6 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1407,9 +1407,6 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba, } out: - if (sas_dev) - atomic64_dec(&sas_dev->running_req); - hisi_sas_slot_task_free(hisi_hba, task, slot); sts = ts->stat;