Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751359AbdGQKWl (ORCPT ); Mon, 17 Jul 2017 06:22:41 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:31029 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbdGQKWg (ORCPT ); Mon, 17 Jul 2017 06:22:36 -0400 Subject: Re: [PATCH] [BUGREPORT] media: v4l: omap_vout: vrfb: initialize DMA flags To: Arnd Bergmann References: <20170710111912.887188-1-arnd@arndb.de> CC: Mauro Carvalho Chehab , , From: Peter Ujfalusi Message-ID: Date: Mon, 17 Jul 2017 13:23:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170710111912.887188-1-arnd@arndb.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 47 Arnd, sorry for the delayed response, I was away w/o internet connection for the past weeks. On 2017-07-10 14:18, Arnd Bergmann wrote: > Passing uninitialized flags into device_prep_interleaved_dma is clearly > a bad idea, and we get a compiler warning for it: > > drivers/media/platform/omap/omap_vout_vrfb.c: In function 'omap_vout_prepare_vrfb': > drivers/media/platform/omap/omap_vout_vrfb.c:273:5: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized] I can not explain why I have missed this. > It seems that the OMAP dmaengine ignores the flags, but we should > pick the right ones anyway. Unfortunately I don't know what they > should be, so I just picked the most common flags. Please set the > right flags here and fold the modified patch. The flags are fine. > > Fixes: 6a1560ecaa8c ("media: v4l: omap_vout: vrfb: Convert to dmaengine") > Signed-off-by: Arnd Bergmann Acked-by: Peter Ujfalusi > --- > drivers/media/platform/omap/omap_vout_vrfb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c b/drivers/media/platform/omap/omap_vout_vrfb.c > index 45a553d4f5b2..fed28b6bbbc0 100644 > --- a/drivers/media/platform/omap/omap_vout_vrfb.c > +++ b/drivers/media/platform/omap/omap_vout_vrfb.c > @@ -233,7 +233,7 @@ int omap_vout_prepare_vrfb(struct omap_vout_device *vout, > struct videobuf_buffer *vb) > { > struct dma_async_tx_descriptor *tx; > - enum dma_ctrl_flags flags; > + enum dma_ctrl_flags flags = DMA_PREP_INTERRUPT | DMA_CTRL_ACK; > struct dma_chan *chan = vout->vrfb_dma_tx.chan; > struct dma_device *dmadev = chan->device; > struct dma_interleaved_template *xt = vout->vrfb_dma_tx.xt; > - P?ter