From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Arnd Bergmann <arnd@arndb.de>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Pavel Machek <pavel@ucw.cz>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: omap3isp: fix uninitialized variable use
Date: Wed, 23 Aug 2017 17:35:34 +0200 [thread overview]
Message-ID: <20170823153534.enifcsolharwrtum@earth> (raw)
In-Reply-To: <20170823135827.l7fgozsbhw5opyy3@valkosipuli.retiisi.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2378 bytes --]
Hi,
On Wed, Aug 23, 2017 at 04:58:27PM +0300, Sakari Ailus wrote:
> 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 <arnd@arndb.de>
> > ---
> > 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:
>
> 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);
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-08-23 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 13:30 [PATCH] media: omap3isp: fix uninitialized variable use Arnd Bergmann
2017-08-23 13:55 ` Laurent Pinchart
2017-08-23 13:58 ` Sakari Ailus
2017-08-23 15:35 ` Sebastian Reichel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170823153534.enifcsolharwrtum@earth \
--to=sebastian.reichel@collabora.co.uk \
--cc=arnd@arndb.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=pavel@ucw.cz \
--cc=sakari.ailus@iki.fi \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox