From patchwork Tue Aug 22 09:56:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 9914721 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 5A11C603FF for ; Tue, 22 Aug 2017 09:59:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 699462883F for ; Tue, 22 Aug 2017 09:59:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E6E028854; Tue, 22 Aug 2017 09:59: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=-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 EF8D428848 for ; Tue, 22 Aug 2017 09:59:38 +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=IYUS56t1yxG7HBW4R4HIRc2wtM hUWdAycAIZCoEi6uCBEvk8gDbkyZRQVCBpBg3ciIQSia5q/nYZ/QJmeIuEcuR3I20McPKbtL+TJW4 njv01Jf5kfPw1FEaSfhpnZ5wQS12cKFXjyU7pOvZfAltcSEfGYoYgmgScJrPM14Nhb3s3Oc9mD81c Ck1Y47eW/ijfuEEe91NuBc6kBY6F19THEMTNxmdMsAn5zAoiZrM8gZ1DTaTA/5Er1AK5Y1f/WpmuH GE7y3hpor8YyVQoAe77RR6SCICbk1nIpS/zpeucnSRLmOLA6C90We0QQ8qHpKAYoPL/VeBWXiJ0Jb u7Yq9dqA==; 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 1dk5yA-0007gp-7v; Tue, 22 Aug 2017 09:59:34 +0000 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk5ws-0006Aw-MO for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2017 09:58:17 +0000 Received: by mail-wr0-x232.google.com with SMTP id k46so45873604wre.2 for ; Tue, 22 Aug 2017 02:57:54 -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=How2pXLYCqYru2p1pGDpKJhWGwt1O592HqZJAgNymMPX3QMfrlxR3GV6f57idhuKGO zfWGGYI+0jz7kyfu2qBK5PlNYaaFtW5t+JJ+6uoyx2zX0UcWxNxTv+zQHw2TUOiHgT0r kRF6JWfUY2FiIfApbpPhDGyxfa/PliNCYUhUM= 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=olblVU5ln9A6uGg8wZaYri0+XkiFN255rtwPtEBUiILKFSBYw3zN0iHIone9wrqd9z JYs+ew4eq3+ZDJEk+YB2sjI71yhmzb5A8TwPriNUfiWu+5axH5AjZ/VNa2OwcWnYDIsA bFj97FMutmTE56DHHBk5HLeycsYDCjvFefxs5uD2UV0gD3NB47Cp6P3fn5HG+taGjmX7 L5tJlFjE+JPTA0MKLcD53PuV6WVpL0nQ684SyIJuefuEACErvg5z8Q1b1VWpsspet9YN MYFJB9b1hoADQpFXsRUk4gCA3nvaacNAjPc4q1lL3V0gp26ws4r8ugR4BsKgvBJFU5lk PBrQ== X-Gm-Message-State: AHYfb5hSY23PQ6XpPnXgdBC/NRgfXxBx/B4Dh4yfIqXgpAaNHN+R4cTN QIdwZR/MjCiWmopQ X-Received: by 10.223.129.166 with SMTP id 35mr84417wra.9.1503395872919; Tue, 22 Aug 2017 02:57:52 -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.57.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Aug 2017 02:57:52 -0700 (PDT) From: Anup Patel To: Vinod Koul , Dan Williams Subject: [PATCH v3 04/17] dmaengine: bcm-sba-raid: Remove redundant next_count from sba_request Date: Tue, 22 Aug 2017 15:26:53 +0530 Message-Id: <1503395827-19428-5-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_025814_963628_DC7567C6 X-CRM114-Status: GOOD ( 10.87 ) 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 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;