From patchwork Mon Apr 14 14:21:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3981931 X-Patchwork-Delegate: dan.j.williams@gmail.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6765E9F2BA for ; Mon, 14 Apr 2014 14:24:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7AB8200CF for ; Mon, 14 Apr 2014 14:23:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3B6320166 for ; Mon, 14 Apr 2014 14:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755493AbaDNOXw (ORCPT ); Mon, 14 Apr 2014 10:23:52 -0400 Received: from top.free-electrons.com ([176.31.233.9]:60207 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755289AbaDNOXt (ORCPT ); Mon, 14 Apr 2014 10:23:49 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 674F71160; Mon, 14 Apr 2014 16:23:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost.localdomain (unknown [190.2.108.71]) by mail.free-electrons.com (Postfix) with ESMTPSA id BDC6F116E; Mon, 14 Apr 2014 16:21:44 +0200 (CEST) From: Ezequiel Garcia To: Cc: Vinod Koul , Dan Williams , Thomas Petazzoni , Gregory Clement , Tawfik Bayouk , Lior Amsalem , Ezequiel Garcia Subject: [RESEND/PATCH 2/4] dma: mv_xor: Remove unneeded mv_xor_clean_completed_slots() call Date: Mon, 14 Apr 2014 11:21:05 -0300 Message-Id: <1397485267-9412-3-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1397485267-9412-1-git-send-email-ezequiel.garcia@free-electrons.com> References: <1397485267-9412-1-git-send-email-ezequiel.garcia@free-electrons.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In mv_xor_status(), we are currently calling mv_xor_clean_completed_slots() when the transaction is complete (the cookie status is DMA_COMPLETE). However, a completed status means that mv_xor_slot_cleanup() was called, which cleans the completed slots. In other words, there's nothing to cleanup for a completed transaction in mv_xor_status(). Remove the unneeded call to mv_xor_clean_completed_slots(). Reported-by: Dan Williams Signed-off-by: Ezequiel Garcia --- drivers/dma/mv_xor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 394cbc5..af6e6e9 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -700,10 +700,8 @@ static enum dma_status mv_xor_status(struct dma_chan *chan, enum dma_status ret; ret = dma_cookie_status(chan, cookie, txstate); - if (ret == DMA_COMPLETE) { - mv_xor_clean_completed_slots(mv_chan); + if (ret == DMA_COMPLETE) return ret; - } mv_xor_slot_cleanup(mv_chan); return dma_cookie_status(chan, cookie, txstate);