From patchwork Mon Jul 10 11:18:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9832789 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 6B18360350 for ; Mon, 10 Jul 2017 11:19:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F736283C3 for ; Mon, 10 Jul 2017 11:19:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 544D7283D8; Mon, 10 Jul 2017 11:19:35 +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 11A77283C3 for ; Mon, 10 Jul 2017 11:19:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753819AbdGJLTX (ORCPT ); Mon, 10 Jul 2017 07:19:23 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:56236 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753703AbdGJLTW (ORCPT ); Mon, 10 Jul 2017 07:19:22 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0Llv9N-1e3aUN2m3N-00ZhSg; Mon, 10 Jul 2017 13:19:14 +0200 From: Arnd Bergmann To: Peter Ujfalusi Cc: Arnd Bergmann , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [BUGREPORT] media: v4l: omap_vout: vrfb: initialize DMA flags Date: Mon, 10 Jul 2017 13:18:48 +0200 Message-Id: <20170710111912.887188-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:YrF6W10H0M6U20D5HwbFdsaAgo5BDMndEfuHCeLV2TWQZ6KHS5u J3+PXcq7N/AXpp5ZsIACo2bL/BnNbYdYGLVOw3bnVD115E8Im/znyeAfYm5+L3JEpjHrqWt DsqqkxLHPP+vkvKJD61tl0/IBpMUtOuA4sg4L1b7XtpzwQFfInQCs9pJA+jg70v852MOVo/ YH3zbB03jDTY1MF6J1rYQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:oJhFm53lW7o=:JNuq/0k1DC8tcwiU8S3Gu4 O6hHsBciUVrXcnRe7YGtPU6Yza+f3sJ7G7h4Y1jFQv19LW6Hr8MdqP9Ct/m0127Mn2Ht53XMP oZewoaoHHpdD1rWf40HsqqruSouNRLvb5BYMt4V8soe/bpBf6pTDmOyvS7fsvVWors3+CaMT2 QCQf4JxDG0Ybk2pJIb0T9SrUhVm523AEj5FXb7dsqGEnpDF7163+4bbWgm9CzjL2lPYxR/4Q7 Uz+5nXrIPGua79XvL1mPrz7hp6j8tZ8PniFlNRIU0vLFSqYwB43k6jCGOpoh20q9reX8A6Tp/ gzMEYV3eaDg1z9vpFUL1/dGmOafl41LgSfZBcAW+sfhJMjq6fgtUOmrsPIuQcQI5JJupnQxPy a4kQFU4mA85Gbxil0g505NWnISMhFSB/rdJ9COJ6DZdzh9OGZrC5COufobxQi8e2DwQlEmBfF M1Poda63ZLbb0mtvTzlPXAXa2h4LtqNyCpaffKVnyMm8bP409vtFwBS/Hwj2WjXZpyMr2ho9D up95DfXjWiXQX0N5FS5uoOFcynQbVUmND3jRCBGlGg638tusUCfk/BzRvehDu/OSmImrXreFS JmcGEVyhKgrx/QXn3dNYwVwKyuddEBkLWNLFQZNbl9IF99rWsnrx1b4SgsgjWDWJb5q/x/kXz yW4QxY55s2t1k9JRdYf2xK1ROw0ntLcNPrfEfmrmHgicZfFpKJETRpx8WHNyBjVW0to8= 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. 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. 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;