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: 9914741 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 360A560381 for ; Tue, 22 Aug 2017 10:01:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 443F02883F for ; Tue, 22 Aug 2017 10:01:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3910728854; Tue, 22 Aug 2017 10:01:24 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B8DBD2883F for ; Tue, 22 Aug 2017 10:01:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Xlfk5TZcWRo3xRh9vy22ev3fQrgA4KxdIhltAbwabfg=; b=fMRinTrVzsRHJ0ZJ9/R7XvDlF3 ULXVZhn172047pz0K0xOcNx0W/mbKAh4OWyJQUPHgcKL4n/34bo4JR2huYmHpgOQqS9q5+G9zsEjQ bd21CDhwlA/VWxrgRLVR7KifKqFeUqgRzZgWFTuKMS9anD9uoYaVmXJ/LzTJVC1xnPRuRhLu2a9ju wxf/wn5ERcudvUshwJq9YOBP9ZJWfybNE6RhuHxiljodKgfSfs4tpL90pe8YPSoMuQkWx7lbtqLhJ NxhV13AjUeh7b0x2DhzH2hrcDUJnuULBGGfYzSVvx7QtBpAb/XsP00H+am40Dbsn5TM+kPS715Zpm i/JeHDHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dk5zr-0001i4-6D; Tue, 22 Aug 2017 10:01:19 +0000 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk5x5-0006PP-GQ for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2017 09:58:41 +0000 Received: by mail-wr0-x233.google.com with SMTP id a47so6397492wra.0 for ; Tue, 22 Aug 2017 02:58:07 -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=QWMhppspmLKRLRadeM1SJDB1HFR0fk/4ZzE34cN4KLVjrjmuMbvlJhD9/SOTP+svM9 86dOjvB0AjYgYDp9NdWZy3FWPI7b9QtDvryEYw95ZMWAl/S0fvQCURxF6t17rM60Vhpk Dox1Iw0KwhcIKtUcBt9266YHD82t5yNWAdqqr9jN1O35hmld+MEDA6vjFExeTBmvP7V4 aCAjqHCO4NriYKszEQJMgfJzQ8jHqe0sIihmvmYy1GqkvN0DeQqC/QyBZQXUTJ7odys4 EbrUE0P46WE/T2ApBkWpTYJ+yZRBzdN/dIPweY6M+I08L157nqRxuTdDKYewPF+EjWTs qwnw== X-Gm-Message-State: AHYfb5h8Xf6KGwu3ia3b7JL6QjKXf34L8KZnYM7CUk4NRewD2X/zdON0 3IT7bJsJWZtKbiYE 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170822_025828_804706_38ABBFCC X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Anup Patel , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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: