From patchwork Tue Aug 22 09:56:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 9914679 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 F21F4600C5 for ; Tue, 22 Aug 2017 09:58:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E3CC28788 for ; Tue, 22 Aug 2017 09:58:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02E962884F; Tue, 22 Aug 2017 09:58:11 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham 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 AA90328788 for ; Tue, 22 Aug 2017 09:58:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932570AbdHVJ6J (ORCPT ); Tue, 22 Aug 2017 05:58:09 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:37789 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932569AbdHVJ6H (ORCPT ); Tue, 22 Aug 2017 05:58:07 -0400 Received: by mail-wr0-f180.google.com with SMTP id z91so118769676wrc.4 for ; Tue, 22 Aug 2017 02:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PriGQe8AyeKHwQfam5IF0aiWfzfeQJdcOygznGlLjlo=; b=VZhgVwyH+m79CTgBTQQV8DtXSPKLd/2hR5lhcHJZj1BRvK5/2GsYP8xNbQJP4lqeEF rjzR3KkYZB6lyDTy+mhHyBZ4R5X+k8rNupTXAhEB13YInX7AlGpXEOZM2y3DGP2Xud7H aDIpg1YBaP+pkWJ7JaXs30lMt3eQh8QksCryo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PriGQe8AyeKHwQfam5IF0aiWfzfeQJdcOygznGlLjlo=; b=kaI9KkFkCpaf69n9Rc+JzNQMPG4BqvPZMTxVz1m44YY1/+kALXJ8ObYnTFTGhyicIq +k5bXA/+O1GQHefxWsNOvZPzA0BXydT0tDJwB/97MRpKkCdcDldrML8OYT+WJApi3Kuq 7JMI2H1e1IJLP29S8Idvfv2PQAKNCkBGnP83rZaf7vwra3WaFls5OC2YHIQ4PqFzv/mG wkopLd1FMKhUP9ipuhkXeCUd7ScWmrCXmLN+sXb/1GmYjpzGNNcE04ZKEHjRc9q0dlE0 d4Hd/qfK5Y3APvVuj2Hmt3HON7/HLZcgtGUX1uyQydNoos/eN3EP9PJXMGKtwm600z5o 5oGw== X-Gm-Message-State: AHYfb5gtgFJR3R3S4q+QV3xnkKy7fOEIPtRVv/yufIdLy+DVYMk6hy2o EZXc0AMBM2uGZFTL X-Received: by 10.223.145.106 with SMTP id j97mr88171wrj.172.1503395885715; Tue, 22 Aug 2017 02:58:05 -0700 (PDT) Received: from anup-HP-Compaq-8100-Elite-CMT-PC.dhcp.avagotech.net ([192.19.237.250]) by smtp.gmail.com with ESMTPSA id e137sm12257913wma.29.2017.08.22.02.58.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Aug 2017 02:58:05 -0700 (PDT) From: Anup Patel To: Vinod Koul , Dan Williams Cc: Florian Fainelli , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Anup Patel Subject: [PATCH v3 06/17] dmaengine: bcm-sba-raid: Remove reqs_free_count from sba_device Date: Tue, 22 Aug 2017 15:26:55 +0530 Message-Id: <1503395827-19428-7-git-send-email-anup.patel@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503395827-19428-1-git-send-email-anup.patel@broadcom.com> References: <1503395827-19428-1-git-send-email-anup.patel@broadcom.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The reqs_free_count member of sba_device is not used anywhere hence no point in tracking number of free sba_request. Signed-off-by: Anup Patel --- drivers/dma/bcm-sba-raid.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c index 7d08d4e..59ef443 100644 --- a/drivers/dma/bcm-sba-raid.c +++ b/drivers/dma/bcm-sba-raid.c @@ -162,7 +162,6 @@ struct sba_device { struct list_head reqs_completed_list; struct list_head reqs_aborted_list; struct list_head reqs_free_list; - int reqs_free_count; }; /* ====== Command helper routines ===== */ @@ -207,10 +206,8 @@ static struct sba_request *sba_alloc_request(struct sba_device *sba) spin_lock_irqsave(&sba->reqs_lock, flags); req = list_first_entry_or_null(&sba->reqs_free_list, struct sba_request, node); - if (req) { + if (req) list_move_tail(&req->node, &sba->reqs_alloc_list); - sba->reqs_free_count--; - } spin_unlock_irqrestore(&sba->reqs_lock, flags); if (!req) return NULL; @@ -276,7 +273,6 @@ static void _sba_free_request(struct sba_device *sba, list_move_tail(&req->node, &sba->reqs_free_list); if (list_empty(&sba->reqs_active_list)) sba->reqs_fence = false; - sba->reqs_free_count++; } static void sba_received_request(struct sba_request *req) @@ -1523,8 +1519,6 @@ static int sba_prealloc_channel_resources(struct sba_device *sba) list_add_tail(&req->node, &sba->reqs_free_list); } - sba->reqs_free_count = sba->max_req; - return 0; fail_free_cmds_pool: