Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752458AbdHAUKJ (ORCPT ); Tue, 1 Aug 2017 16:10:09 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36531 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbdHAUKF (ORCPT ); Tue, 1 Aug 2017 16:10:05 -0400 From: Antonio Borneo To: dmaengine@vger.kernel.org, Vinod Koul , Dan Williams Cc: Antonio Borneo , linux-kernel@vger.kernel.org, John Stultz , Zhangfei Gao Subject: [PATCH v2 3/3] dmaengine: k3dma: remove useless ON_WARN_ONCE() Date: Tue, 1 Aug 2017 22:09:27 +0200 Message-Id: <20170801200928.24661-4-borneo.antonio@gmail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170801200928.24661-1-borneo.antonio@gmail.com> References: <20170801200928.24661-1-borneo.antonio@gmail.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 45 Commit 36387a2b1f62b5c087c5fe6f0f7b23b94f722ad7 ("k3dma: Fix memory handling in preparation for cyclic mode") adds few calls to ON_WARN_ONCE() to track the use of ds_run/ds_done. After the two fixes: - dmaengine: k3dma: fix non-cyclic mode - dmaengine: k3dma: fix re-free of the same descriptor the behaviour of ds_run/ds_done is properly fixed. The remaining ON_WARN_ONCE() are never triggered and can be removed. Signed-off-by: Antonio Borneo --- To: dmaengine@vger.kernel.org To: Vinod Koul To: Dan Williams Cc: linux-kernel@vger.kernel.org Cc: John Stultz Cc: Zhangfei Gao --- drivers/dma/k3dma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index b769623..01d2a75 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -223,7 +223,6 @@ static irqreturn_t k3_dma_int_handler(int irq, void *dev_id) if (c && (tc1 & BIT(i))) { spin_lock_irqsave(&c->vc.lock, flags); vchan_cookie_complete(&p->ds_run->vd); - WARN_ON_ONCE(p->ds_done); p->ds_done = p->ds_run; p->ds_run = NULL; spin_unlock_irqrestore(&c->vc.lock, flags); @@ -274,7 +273,6 @@ static int k3_dma_start_txd(struct k3_dma_chan *c) */ list_del(&ds->vd.node); - WARN_ON_ONCE(c->phy->ds_run); c->phy->ds_run = ds; c->phy->ds_done = NULL; /* start dma */ -- 1.9.1