From patchwork Wed Jul 26 15:23:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9865311 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 DF67A6038C for ; Wed, 26 Jul 2017 15:24:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E31A32871A for ; Wed, 26 Jul 2017 15:24:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D73C128762; Wed, 26 Jul 2017 15:24:00 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DA4E2871A for ; Wed, 26 Jul 2017 15:24:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751986AbdGZPXg (ORCPT ); Wed, 26 Jul 2017 11:23:36 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:61789 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751629AbdGZPX2 (ORCPT ); Wed, 26 Jul 2017 11:23:28 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MflIG-1dFXtF1WvE-00ND5T; Wed, 26 Jul 2017 17:23:21 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab , Peter Ujfalusi Cc: Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: v4l: omap_vout: vrfb: initialize DMA flags Date: Wed, 26 Jul 2017 17:23:07 +0200 Message-Id: <20170726152320.4077805-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:d/et+wAE+15+nHOMAkn+EEQViPDiYYrDmYVQDDzwPsmIdO3BxAB 5ymtePEv+Z8nPv8LdGUvCSpq/4mHwUdoDHrUt+LfpPWJSj90XYT/FqjG/LznILK49hENCrR plFXxr/ZWQsRTFyl9RNa2xf/ng4t4mJZMLoAzpvqnKBdyfZHlwv0ICwWQQmT8IuZzDXf1HZ LWdPtWhupBor+w/x7s8Ig== X-UI-Out-Filterresults: notjunk:1; V01:K0:dXOIaLZSxc8=:iDrRVx3aMhtKe/unWJv0su mlH/xCykKJqgnDeZ2cj3i0mAmGvDX2VCX8P8Q9Y10+PpHoeg3yY34UkoeVkP8okLs8zQ+cVs6 XCKl4CxKcrR9cq6Gp3BzPNALXeTQdu4iaC/LuOYMd3ru15zfZ08q3c448X6Oj1+Lcgm3nI0XW lMTYf51R/l9UF275/UBokSDgmSXwxg+wDcv+xyIFP6knaACesR2wt+008Q6YUdHgdSG35EQmg qno/Xv1UPtP/sAMyhzDrDPFghHrcC5RcC/68rtXDQx6J0PwPYz/cPeMvNlg0qXXSzbdZ8nE6P Gkk4R4iTEbYV4B/I31J8/fWDjpAZZK4joEVUsi9XZmXhcv5vF5eVrpIE8Jr9ROOxzJE70Q2QJ zoQnOfMuJlj3JO2B8Z0ngv0yzkdgKCMPf+iWW2AsiBJNWIQZwHx8R4v6W05yQO9gnhe9XtaJd GrsSOnTlDhXqSglLzYXy6hOsPMnGP4d4VNv8op/fD7Ai7JX76eTyLot8/yEZL95aJzMtWiRe9 NI7NgouAm9u1w2LmFQSOqiPfEZGmUU6/59PZ6JCd3hGfiRN+f1KmLBIrjPjjSylULZ45pUjmU 7HfHLN/ssRigg4roZgjoOYSRn5YR+klnWDaACety87ZoBKugoUbxej3DoedYr44OlI2GoqFYR kzPTOxUDllFDSSCJrBUxM3Sm3wp17RM8F8sFEpRrw5jPHs1aaAbMGvADa8YgQiU2hJpkltZU2 56sBiDoGnuMAuIVjUhgTww+jiB7UU+IXInYnsA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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] It seems that the OMAP dmaengine ignores the flags, but we should pick the right ones anyway. This sets the flags I guessed based on what other drivers used, and Peter confirmed that they are the right ones. Fixes: 6a1560ecaa8c ("media: v4l: omap_vout: vrfb: Convert to dmaengine") Acked-by: Peter Ujfalusi Signed-off-by: Arnd Bergmann --- Originally sent on July 10 as a bugreport. Since Peter has confirmed the fix to be correct, please merge this for 4.13. --- 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 040eacc45168..123c2b26a933 100644 --- a/drivers/media/platform/omap/omap_vout_vrfb.c +++ b/drivers/media/platform/omap/omap_vout_vrfb.c @@ -234,7 +234,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;