From patchwork Tue Aug 1 10:37:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 9874117 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 AD46E603B4 for ; Tue, 1 Aug 2017 10:39:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2CBC2868C for ; Tue, 1 Aug 2017 10:39:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A66AE286AC; Tue, 1 Aug 2017 10:39:38 +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 4BEDF286A0 for ; Tue, 1 Aug 2017 10:39:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840AbdHAKjF (ORCPT ); Tue, 1 Aug 2017 06:39:05 -0400 Received: from mail-qt0-f172.google.com ([209.85.216.172]:35800 "EHLO mail-qt0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960AbdHAKjD (ORCPT ); Tue, 1 Aug 2017 06:39:03 -0400 Received: by mail-qt0-f172.google.com with SMTP id p3so6417262qtg.2 for ; Tue, 01 Aug 2017 03:39:03 -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=BIkJ2JyaAArKk8TEuANgQCbbw57nb5evyduDk5UePrTDzrQC/WDAuOCz2piHRxe7q8 Gk8exL3AWMbROPNThbhCfMTelWK2aiCTIF4HNAnKS3UJ6gikIwsw+UTmp+7U8b+aE/+Q TgS3iMtDA7iwOWUKuJr+x0qA2U3MUsGrbkY1I= 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=Yhn6NbGIvRyQuiL56v93q8CUKQHqCB4ac9ptT71Ae0dXQqv7/TjCbfZuxgv6gvcRAZ 0ATHaH+Xgg7hrPbZN6CI9d5N2+Hqhpwdagk8psjeLYc1v32CkKpLeAHzkeeFIzQrYbkY BzM1acXBpY2UYB9rzhbteHOoVEFbxMLqwNKMdxMPE0EBljVzxOQT6fycCbj03nFASg6A LrplnHSbUPGDy8XyaFLTHV9K1nfVbhqfjaR/n/Rl5xO7RuHq/1hds0prsTHPxu9o0l7o 2Kqqk+fGY0U0bsj9nrx83qlRNqEIM/H7zOE78e4VS+iVfCTOwrGE1hjDG7IMXsfPGcmo LRQA== X-Gm-Message-State: AIVw112dM+uLQ9ogIkbqJ8vaRAUxJOkigmfK7rHk8qjIzo8qEBxWFJFg QPTIWSQKZYu/LdTn X-Received: by 10.237.61.200 with SMTP id j8mr24903348qtf.111.1501583942980; Tue, 01 Aug 2017 03:39:02 -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 e32sm21784162qtb.63.2017.08.01.03.38.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Aug 2017 03:39:02 -0700 (PDT) From: Anup Patel To: Rob Herring , Mark Rutland , Vinod Koul , Dan Williams Cc: Florian Fainelli , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Anup Patel Subject: [PATCH v2 06/16] dmaengine: bcm-sba-raid: Remove reqs_free_count from sba_device Date: Tue, 1 Aug 2017 16:07:50 +0530 Message-Id: <1501583880-32072-7-git-send-email-anup.patel@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501583880-32072-1-git-send-email-anup.patel@broadcom.com> References: <1501583880-32072-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: