From patchwork Wed Aug 23 13:58:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9917439 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 5A67660327 for ; Wed, 23 Aug 2017 13:58:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CE6928068 for ; Wed, 23 Aug 2017 13:58:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4120F2838B; Wed, 23 Aug 2017 13:58:47 +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 C863428068 for ; Wed, 23 Aug 2017 13:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754094AbdHWN6b (ORCPT ); Wed, 23 Aug 2017 09:58:31 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:36036 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754034AbdHWN6b (ORCPT ); Wed, 23 Aug 2017 09:58:31 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2001:1bc8:1a6:d3d5::80:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id A9C29600D4; Wed, 23 Aug 2017 16:58:28 +0300 (EEST) Received: from sakke by valkosipuli.localdomain with local (Exim 4.89) (envelope-from ) id 1dkWAu-0000Hf-6V; Wed, 23 Aug 2017 16:58:28 +0300 Date: Wed, 23 Aug 2017 16:58:27 +0300 From: Sakari Ailus To: Arnd Bergmann Cc: Laurent Pinchart , Mauro Carvalho Chehab , Sakari Ailus , Pavel Machek , Sebastian Reichel , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: omap3isp: fix uninitialized variable use Message-ID: <20170823135827.l7fgozsbhw5opyy3@valkosipuli.retiisi.org.uk> References: <20170823133044.686146-1-arnd@arndb.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170823133044.686146-1-arnd@arndb.de> User-Agent: NeoMutt/20170113 (1.7.2) 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 Hi Arnd, On Wed, Aug 23, 2017 at 03:30:19PM +0200, Arnd Bergmann wrote: > A debug printk statement was copied incorrectly into the new > csi1 parser code and causes a warning there: > > drivers/media/platform/omap3isp/isp.c: In function 'isp_probe': > include/linux/dynamic_debug.h:134:3: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > Since there is only one lane, the index is never set. This > changes the debug print to always print a zero instead, > keeping the original format of the message. > > Fixes: 9211434bad30 ("media: omap3isp: Parse CSI1 configuration from the device tree") > Signed-off-by: Arnd Bergmann > --- > drivers/media/platform/omap3isp/isp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c > index 83aea08b832d..30c825bf80d9 100644 > --- a/drivers/media/platform/omap3isp/isp.c > +++ b/drivers/media/platform/omap3isp/isp.c > @@ -2092,7 +2092,7 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode, > buscfg->bus.ccp2.lanecfg.data[0].pol = > vep.bus.mipi_csi1.lane_polarity[1]; > > - dev_dbg(dev, "data lane %u polarity %u, pos %u\n", i, > + dev_dbg(dev, "data lane 0 polarity %u, pos %u\n", > buscfg->bus.ccp2.lanecfg.data[0].pol, > buscfg->bus.ccp2.lanecfg.data[0].pos); > Thanks! I removed "0 "; CCP2 always has a single lane. The patch is now: Reviewed-by: Sebastian Reichel diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 83aea08b832d..1a428fe9f070 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -2092,7 +2092,7 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode, buscfg->bus.ccp2.lanecfg.data[0].pol = vep.bus.mipi_csi1.lane_polarity[1]; - dev_dbg(dev, "data lane %u polarity %u, pos %u\n", i, + dev_dbg(dev, "data lane polarity %u, pos %u\n", buscfg->bus.ccp2.lanecfg.data[0].pol, buscfg->bus.ccp2.lanecfg.data[0].pos);