Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933140Ab1D1RLe (ORCPT ); Thu, 28 Apr 2011 13:11:34 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:56177 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932867Ab1D1RLc (ORCPT ); Thu, 28 Apr 2011 13:11:32 -0400 Date: Thu, 28 Apr 2011 18:11:18 +0100 From: Russell King - ARM Linux To: Viresh Kumar Cc: vinod.koul@intel.com, dan.j.williams@intel.com, armando.visconti@st.com, linux-kernel@vger.kernel.org, shiraz.hashim@st.com, viresh.linux@gmail.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V3 3/7] dmaengine/dw_dmac: don't call callback routine in case dmaengine_terminate_all() is called Message-ID: <20110428171118.GC17290@n2100.arm.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1294 Lines: 29 On Wed, Apr 27, 2011 at 03:06:45PM +0530, Viresh Kumar wrote: > If dmaengine_terminate_all() is called for dma channel, then it doesn't make > much sense to call registered callback routine. While in case of success or > failure it must be called. > > Signed-off-by: Viresh Kumar > --- > drivers/dma/dw_dmac.c | 27 ++++++++++++++------------- > 1 files changed, 14 insertions(+), 13 deletions(-) > > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c > index b6dfc39..f590109 100644 > --- a/drivers/dma/dw_dmac.c > +++ b/drivers/dma/dw_dmac.c > @@ -198,7 +198,8 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first) > /*----------------------------------------------------------------------*/ > > static void > -dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc) > +dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc, > + bool callback_required) If you're using 'bool' then using 'true' and 'false' with it rather than '1' and '0' is a good idea. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/