Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718354 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-08-23 15:40 +0200 |
| Last post | 2017-08-23 16:00 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] media: omap3isp: fix uninitialized variable use Arnd Bergmann <arnd@arndb.de> - 2017-08-23 15:40 +0200
Re: [PATCH] media: omap3isp: fix uninitialized variable use Sakari Ailus <sakari.ailus@iki.fi> - 2017-08-23 16:00 +0200
Re: [PATCH] media: omap3isp: fix uninitialized variable use Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-08-23 17:40 +0200
Re: [PATCH] media: omap3isp: fix uninitialized variable use Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2017-08-23 16:00 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-08-23 15:40 +0200 |
| Subject | [PATCH] media: omap3isp: fix uninitialized variable use |
| Message-ID | <uhE30-17N-13@gated-at.bofh.it> |
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);
--
2.9.0
[toc] | [next] | [standalone]
| From | Sakari Ailus <sakari.ailus@iki.fi> |
|---|---|
| Date | 2017-08-23 16:00 +0200 |
| Message-ID | <uhEmm-1ex-13@gated-at.bofh.it> |
| In reply to | #1718354 |
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 <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);
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-08-23 17:40 +0200 |
| Message-ID | <uhFV7-2iZ-3@gated-at.bofh.it> |
| In reply to | #1718375 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| Date | 2017-08-23 16:00 +0200 |
| Message-ID | <uhEmn-1ex-35@gated-at.bofh.it> |
| In reply to | #1718354 |
Hi Arnd,
Thank you for the patch.
On Wednesday, 23 August 2017 16:30:19 EEST 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>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> 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);
--
Regards,
Laurent Pinchart
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web