From patchwork Wed Feb 20 01:09:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 10820961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 998FB922 for ; Wed, 20 Feb 2019 01:09:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83AE52D9A5 for ; Wed, 20 Feb 2019 01:09:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77B822D9B1; Wed, 20 Feb 2019 01:09:49 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 EE1AE2D9A5 for ; Wed, 20 Feb 2019 01:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727547AbfBTBJr (ORCPT ); Tue, 19 Feb 2019 20:09:47 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33576 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbfBTBJr (ORCPT ); Tue, 19 Feb 2019 20:09:47 -0500 Received: by mail-pg1-f196.google.com with SMTP id h11so8616151pgl.0; Tue, 19 Feb 2019 17:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/ZXl8u2+Ji7jhuDrdnqY/X5VDHJkz/h056CNe/x5sP4=; b=jsxnb+ibyvF08NSmHdch3pRCMIHSBnKTIZk24PhDBzBYqpRiKQ9vQAbL1IgmeN1eGU UaAVAQdedikJ/e+b41TIvRAhJdYbIuXHuEWK+NC+Vw+jfGKQXgllwAS0p1DHyD1iQ08m smh/jSnbFf7qt3iC+aydS2JvKCQJXiSlKnijyJErpCf8SCKw74i2UHPxJR659u26JHyd td5NnDkJDNgTlsXPtpkeUlmVVRiUHHBzSeck71KEXCUi6gtiNshfXNOYmKow/IJs8by5 zug33pXZcGM7/ezAk3RM1XUun7isPZs4vrd+mJZdYAobARbp0rWy91ayj+dPPuZI502Y mruA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/ZXl8u2+Ji7jhuDrdnqY/X5VDHJkz/h056CNe/x5sP4=; b=fQOcdVcKnllnIi2WX5DxXF0EtPUrzPAOWEfdo+QwM63+ZMO666qPwsJEcqbSsqrkhd dejwFu8FvP51i90IFOtOkCKRoXbJu+l0f/2Ef2X8b/7PRjPAuJDw8ozF795fgISH+zBZ dM4gAEOC8YvAiYJnpd7UOc3VmZEqU+NIGgPA3fl05ijkGT00rWbe4ZOWHfSNOzje/a8A jnyww0kg195rsDQRZLWhqG51boWgEMf3psr1DCs3Y2MHqTpv7MI9s+U0mR+2ORhybwWk bSh90U9iSCrMIKFDnDWWJA+FUIJrTlt4EvfJNXKQ7V5dNwvUD/nNJNecDOKQlnr2OVQS hajw== X-Gm-Message-State: AHQUAualF0VJQ0nmd58IRcSPcKgYXl5hACOyxCSFKz1NQiPN86NyVKRm 59wpraLL+Zq8wvads+6UC1nm0j5l X-Google-Smtp-Source: AHgI3IZ9HOc+W0MAtLDj4iqrkQCb3s5VnEvATLHqkmTUtwEcPJLLmLMmmyIBlHn/K2LGNB0R2B54pA== X-Received: by 2002:a63:2882:: with SMTP id o124mr26878378pgo.446.1550624986007; Tue, 19 Feb 2019 17:09:46 -0800 (PST) Received: from majic.sklembedded.com (c-73-202-231-77.hsd1.ca.comcast.net. [73.202.231.77]) by smtp.googlemail.com with ESMTPSA id 67sm58685582pfl.175.2019.02.19.17.09.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 17:09:45 -0800 (PST) From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] media: imx: vdic: Restore default case to prepare_vdi_in_buffers() Date: Tue, 19 Feb 2019 17:09:38 -0800 Message-Id: <20190220010938.5197-1-slongerbeam@gmail.com> X-Mailer: git-send-email 2.17.1 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 Restore a default case to prepare_vdi_in_buffers() to fix the following smatch errors: drivers/staging/media/imx/imx-media-vdic.c:236 prepare_vdi_in_buffers() error: uninitialized symbol 'prev_phys'. drivers/staging/media/imx/imx-media-vdic.c:237 prepare_vdi_in_buffers() error: uninitialized symbol 'curr_phys'. drivers/staging/media/imx/imx-media-vdic.c:238 prepare_vdi_in_buffers() error: uninitialized symbol 'next_phys'. Fixes: 6e537b58de772 ("media: imx: vdic: rely on VDIC for correct field order") Reported-by: Hans Verkuil Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-vdic.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c index 2808662e2597..37bfbd4a1c39 100644 --- a/drivers/staging/media/imx/imx-media-vdic.c +++ b/drivers/staging/media/imx/imx-media-vdic.c @@ -231,6 +231,12 @@ static void __maybe_unused prepare_vdi_in_buffers(struct vdic_priv *priv, curr_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0); next_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0) + is; break; + default: + /* + * can't get here, priv->fieldtype can only be one of + * the above. This is to quiet smatch errors. + */ + return; } ipu_cpmem_set_buffer(priv->vdi_in_ch_p, 0, prev_phys);