From patchwork Tue Aug 1 10:37:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 9874221 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 B031060375 for ; Tue, 1 Aug 2017 10:54:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0D0928684 for ; Tue, 1 Aug 2017 10:54:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B412B286A7; Tue, 1 Aug 2017 10:54:39 +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 31A5A28689 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=AU8F2IuUfLKX8xuMXmwJfIvSQC58NjQmmFhBWYHXUmw=; b=BWaTHMW95AA+nmlEYnY03C1+L8 FedmsvFnrQ/Yx27QAc7tqDk1M0TUHkM9NJRwbILYIhxH9FyVovsMorWMyAaSKQ2+adfAPlamLwFhi kcvqVr/Q3/FO0cf7GM7g+x/N2Qgyg3baXClLGkfq+BYAlutyhRwFHbfF7kvQffJi9ESc6/1wuS/ls 2ckIcqog5d3GJPPWQS03IgITrbB3bHl5M3v6rICwiJZ0R7zbLRYkmVtlhvi0VT9jx+k8witoC0aUy s5UPrVniHKCGlwbfpIuANlw1IfSQgOKtBMfPgoQAOsJ4cxQm7tbkutEnMsRn7oZWXFXHkLUijtKfP epyF+ZPw==; 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 1dcUoL-0005bN-1a; Tue, 01 Aug 2017 10:54:01 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcUb3-0004Wb-Dz for linux-arm-kernel@bombadil.infradead.org; Tue, 01 Aug 2017 10:40:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1tY9NmwRD4CH/krimMiWb1WQC7YmppqD1blbSLsUVrQ=; b=GgWczOveMDO+ISNrx6UtjgXw9 dfmNsfVy788I2BtsUFBgNORUYO3F+ISFPU5aB68V25aZyRdcP/+vo2eglyO8GkedhRoOeRrswRkYE vcinV0ZE9YNgFnc+hqsGjaJGxotAMhq8KZImf68bAdNX6QTx3oOicrVHlLk9bN1SJFNd8H0DVxBZY z4k24w7DXQKmvlyKCV6aiYUTPOptQBRO17pF47eQ9SzDfdJGahu7mtOavCNLpZXbf+dOeU9efHw4Y URwSRHpqCExIjAho15pEEcxZZaozbKfwp7w1+Mpu8ZgO4SjOCaWsY+lZ1N8tPCFr8BtFmJ1jFHhmf r4yKlFDkA==; Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcUZw-0005hB-LA for linux-arm-kernel@lists.infradead.org; Tue, 01 Aug 2017 10:39:10 +0000 Received: by mail-qk0-x22a.google.com with SMTP id d145so6512841qkc.2 for ; Tue, 01 Aug 2017 03:38:48 -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=1tY9NmwRD4CH/krimMiWb1WQC7YmppqD1blbSLsUVrQ=; b=YnziTXPznZwmpN60SnzCWq05LahmgEGwbYsh47/qO3TGuF9FhFT5JXNeBuM/5BaBqm spGnFn1lP371JyLizgJE9gVZ0fMfO2aAXEsFXKWGLqEg8M0RRVVwqSwxGe+8fgFzu3Hr b9DRpckqv54hhsS2B/GnyyAnDBdnsDLnglBRg= 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=1tY9NmwRD4CH/krimMiWb1WQC7YmppqD1blbSLsUVrQ=; b=sVk658jCtxhO0vy7TCNSWU5AhRLycxB4Yd1IPCiIUkvmgZFLvpILlkawekYWzhgh4/ VODkg8yewxQ6x6ON/vcXgbMXDdRinPRSmlDTNtsB7qbgHNc71DhzeROfYqATBBjpDJZm HItLTdFc4nhKuNhTFP0omgN8vS/wBZhiqyiaxcVQ099u47lzHuAusdeSQASHdcvXQ/zg d//iIcYMyQMAT1g1dpH56G0QdVYpskbLv+yMGltdxA7g8VUapBMKWIwEnY96IO1Aw3d1 zPO/JYr07QDPNAJQLwkl0GOsv7PRTLBZRbytUSpqZic6xMr8Vpp0SXw++aJP+2Y37jYn gYRQ== X-Gm-Message-State: AIVw110A0DeE1C8y1kfZk075KDgzEkYOvqP0wDCaHG7XOZHMN/YQuZ/M M6UClQYGBBWfzn4Q X-Received: by 10.55.135.132 with SMTP id j126mr11986819qkd.129.1501583925904; Tue, 01 Aug 2017 03:38:45 -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.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Aug 2017 03:38:45 -0700 (PDT) From: Anup Patel To: Rob Herring , Mark Rutland , Vinod Koul , Dan Williams Subject: [PATCH v2 04/16] dmaengine: bcm-sba-raid: Remove redundant next_count from sba_request Date: Tue, 1 Aug 2017 16:07:48 +0530 Message-Id: <1501583880-32072-5-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-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 next_count in sba_request is redundant because same information is captured by next_pending_count. This patch removes next_count from sba_request. Signed-off-by: Anup Patel --- drivers/dma/bcm-sba-raid.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c index 6fa3df1..e8863e9 100644 --- a/drivers/dma/bcm-sba-raid.c +++ b/drivers/dma/bcm-sba-raid.c @@ -111,7 +111,6 @@ struct sba_request { /* Chained requests management */ struct sba_request *first; struct list_head next; - unsigned int next_count; atomic_t next_pending_count; /* BRCM message data */ void *resp; @@ -221,7 +220,6 @@ static struct sba_request *sba_alloc_request(struct sba_device *sba) req->flags = SBA_REQUEST_STATE_ALLOCED; req->first = req; INIT_LIST_HEAD(&req->next); - req->next_count = 1; atomic_set(&req->next_pending_count, 1); dma_async_tx_descriptor_init(&req->tx, &sba->dma_chan); @@ -342,8 +340,7 @@ static void sba_chain_request(struct sba_request *first, list_add_tail(&req->next, &first->next); req->first = first; - first->next_count++; - atomic_set(&first->next_pending_count, first->next_count); + atomic_inc(&first->next_pending_count); spin_unlock_irqrestore(&sba->reqs_lock, flags); } @@ -1501,7 +1498,6 @@ static int sba_prealloc_channel_resources(struct sba_device *sba) req->sba = sba; req->flags = SBA_REQUEST_STATE_FREE; INIT_LIST_HEAD(&req->next); - req->next_count = 1; atomic_set(&req->next_pending_count, 0); req->resp = sba->resp_base + p; req->resp_dma = sba->resp_dma_base + p;