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: 9874223 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 23B2960375 for ; Tue, 1 Aug 2017 10:54:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 349A128542 for ; Tue, 1 Aug 2017 10:54:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2944A28676; Tue, 1 Aug 2017 10:54:41 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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 31D402868B for ; Tue, 1 Aug 2017 10:54:37 +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=kSGuYTpYC1B5gnW0+8FgV27ljd eRXPyuva/53pO3s9S58ELc46F3fLrkil2MWfPtXfNf2pEatl9c5ZW0Mbz8dWST5gv0HQAcQTNBT3C 9Sm+D40A12qi+3WbSyF06Ui0yJhoAY92JwJDo7xnnXMWeaVvmCXKWxHY+TiN/JpxeVnlLZPTHQb0w h5aUVNj0MYqlssC4Nsob3EP86Enh4OTLK7nPallPgXdB83iHv4/iaf1CYNNJcqMSvF+TI4GmbEi7J imq2yHSdNgiH01OApha52OX9suBe8pgVGDYv5ciP7hgQJbSqBhajc/hk6orKY1dSF7HU+NJEAulet 3XwdZpsQ==; 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 1dcUoB-0005U0-LW; Tue, 01 Aug 2017 10:53:51 +0000 Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcUaD-0003hk-A6 for linux-arm-kernel@lists.infradead.org; Tue, 01 Aug 2017 10:39:45 +0000 Received: by mail-qt0-x235.google.com with SMTP id 16so6420295qtz.4 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=iZepfSPvkyAp0BQ/6bkpC08fxObD4HR3wejwRW7OUZbzgGz3bs7aRjA1zOGyjIpwhK oeIQSrm0x1mi9LhnuyOczUu4Wru0YSuhNKyBYy4b7c8ijN0Hpqy/XW7W6FTrtlgJP3G/ 8Kjcr1Cgj6q5ppd2RR7ClskCEpIQln4iCG7YgaO5g2XKmt8pof3FxRiSterqUgNnh0pR hD7FSfHbWpCds5BJYQncOsGx8rNHmgBPGvVxD5HxPAkMvcK9f1z9F8x6MbDHN3DXLyrh U47Jqalg7fn2W3YrGAmpu4sbuCGdimwQDEjbUbe8MQ440siaIaH5gONjR0xaOYTLvBgK JYiQ== X-Gm-Message-State: AIVw110gm6Ofxnz/+IRe91IblbKtiM89Q9mSGyhFpEIVKd9vyvMzbxBi GsldgbAB9KzLwd+P 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170801_033925_832091_2E11CB83 X-CRM114-Status: GOOD ( 12.82 ) 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: devicetree@vger.kernel.org, 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: