* [PATCH] omap3: isp: fix compiler warning
@ 2011-05-18 16:06 Sanjeev Premi
2011-05-21 10:55 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 5+ messages in thread
From: Sanjeev Premi @ 2011-05-18 16:06 UTC (permalink / raw)
To: linux-media; +Cc: Sanjeev Premi, laurent.pinchart
This patch fixes this compiler warning:
drivers/media/video/omap3isp/isp.c: In function 'isp_isr_dbg':
drivers/media/video/omap3isp/isp.c:392:2: warning: zero-length
gnu_printf format string
Since printk() is used in next few statements, same was used
here as well.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Cc: laurent.pinchart@ideasonboard.com
---
Actually full block can be converted to dev_dbg()
as well; but i am not sure about original intent
of the mix.
Based on comments, i can resubmit with all prints
converted to dev_dbg.
drivers/media/video/omap3isp/isp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c
index 503bd79..1d38d96 100644
--- a/drivers/media/video/omap3isp/isp.c
+++ b/drivers/media/video/omap3isp/isp.c
@@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus)
};
int i;
- dev_dbg(isp->dev, "");
+ printk(KERN_DEBUG "%s:\n", dev_driver_string(isp->dev));
for (i = 0; i < ARRAY_SIZE(name); i++) {
if ((1 << i) & irqstatus)
--
1.7.2.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] omap3: isp: fix compiler warning
2011-05-18 16:06 [PATCH] omap3: isp: fix compiler warning Sanjeev Premi
@ 2011-05-21 10:55 ` Mauro Carvalho Chehab
2011-05-22 19:25 ` Laurent Pinchart
0 siblings, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-21 10:55 UTC (permalink / raw)
To: Sanjeev Premi; +Cc: linux-media, laurent.pinchart
Em 18-05-2011 13:06, Sanjeev Premi escreveu:
> This patch fixes this compiler warning:
> drivers/media/video/omap3isp/isp.c: In function 'isp_isr_dbg':
> drivers/media/video/omap3isp/isp.c:392:2: warning: zero-length
> gnu_printf format string
>
> Since printk() is used in next few statements, same was used
> here as well.
>
> Signed-off-by: Sanjeev Premi <premi@ti.com>
> Cc: laurent.pinchart@ideasonboard.com
> ---
>
> Actually full block can be converted to dev_dbg()
> as well; but i am not sure about original intent
> of the mix.
>
> Based on comments, i can resubmit with all prints
> converted to dev_dbg.
It is probably better to convert the full block to dev_dbg.
>
>
>
> drivers/media/video/omap3isp/isp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c
> index 503bd79..1d38d96 100644
> --- a/drivers/media/video/omap3isp/isp.c
> +++ b/drivers/media/video/omap3isp/isp.c
> @@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus)
> };
> int i;
>
> - dev_dbg(isp->dev, "");
> + printk(KERN_DEBUG "%s:\n", dev_driver_string(isp->dev));
>
> for (i = 0; i < ARRAY_SIZE(name); i++) {
> if ((1 << i) & irqstatus)
Cheers,
Mauro
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] omap3: isp: fix compiler warning
2011-05-21 10:55 ` Mauro Carvalho Chehab
@ 2011-05-22 19:25 ` Laurent Pinchart
2011-05-23 18:09 ` Premi, Sanjeev
0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2011-05-22 19:25 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Sanjeev Premi, linux-media
Hi Mauro and Sanjeev,
On Saturday 21 May 2011 12:55:32 Mauro Carvalho Chehab wrote:
> Em 18-05-2011 13:06, Sanjeev Premi escreveu:
> > This patch fixes this compiler warning:
> > drivers/media/video/omap3isp/isp.c: In function 'isp_isr_dbg':
> > drivers/media/video/omap3isp/isp.c:392:2: warning: zero-length
> >
> > gnu_printf format string
> >
> > Since printk() is used in next few statements, same was used
> > here as well.
> >
> > Signed-off-by: Sanjeev Premi <premi@ti.com>
> > Cc: laurent.pinchart@ideasonboard.com
> > ---
> >
> > Actually full block can be converted to dev_dbg()
> > as well; but i am not sure about original intent
> > of the mix.
> >
> > Based on comments, i can resubmit with all prints
> > converted to dev_dbg.
>
> It is probably better to convert the full block to dev_dbg.
You can't insert a KERN_CONT with dev_dbg().
> > drivers/media/video/omap3isp/isp.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/media/video/omap3isp/isp.c
> > b/drivers/media/video/omap3isp/isp.c index 503bd79..1d38d96 100644
> > --- a/drivers/media/video/omap3isp/isp.c
> > +++ b/drivers/media/video/omap3isp/isp.c
> > @@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct isp_device
> > *isp, u32 irqstatus)
> >
> > };
> > int i;
> >
> > - dev_dbg(isp->dev, "");
> > + printk(KERN_DEBUG "%s:\n", dev_driver_string(isp->dev));
The original code doesn't include any \n. Is there a particular reason why you
want to add one ?
> > for (i = 0; i < ARRAY_SIZE(name); i++) {
> >
> > if ((1 << i) & irqstatus)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] omap3: isp: fix compiler warning
2011-05-22 19:25 ` Laurent Pinchart
@ 2011-05-23 18:09 ` Premi, Sanjeev
2011-05-25 8:14 ` Laurent Pinchart
0 siblings, 1 reply; 5+ messages in thread
From: Premi, Sanjeev @ 2011-05-23 18:09 UTC (permalink / raw)
To: Laurent Pinchart, Mauro Carvalho Chehab; +Cc: linux-media
> -----Original Message-----
> From: Laurent Pinchart [mailto:laurent.pinchart@ideasonboard.com]
> Sent: Monday, May 23, 2011 12:56 AM
> To: Mauro Carvalho Chehab
> Cc: Premi, Sanjeev; linux-media@vger.kernel.org
> Subject: Re: [PATCH] omap3: isp: fix compiler warning
>
> Hi Mauro and Sanjeev,
>
> On Saturday 21 May 2011 12:55:32 Mauro Carvalho Chehab wrote:
> > Em 18-05-2011 13:06, Sanjeev Premi escreveu:
> > > This patch fixes this compiler warning:
> > > drivers/media/video/omap3isp/isp.c: In function 'isp_isr_dbg':
> > > drivers/media/video/omap3isp/isp.c:392:2: warning: zero-length
> > >
> > > gnu_printf format string
> > >
> > > Since printk() is used in next few statements, same was used
> > > here as well.
> > >
> > > Signed-off-by: Sanjeev Premi <premi@ti.com>
> > > Cc: laurent.pinchart@ideasonboard.com
> > > ---
> > >
> > > Actually full block can be converted to dev_dbg()
> > > as well; but i am not sure about original intent
> > > of the mix.
> > >
> > > Based on comments, i can resubmit with all prints
> > > converted to dev_dbg.
> >
> > It is probably better to convert the full block to dev_dbg.
>
> You can't insert a KERN_CONT with dev_dbg().
[sp] I did realize that hence changed only the call to dev_dbg.
>
> > > drivers/media/video/omap3isp/isp.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/drivers/media/video/omap3isp/isp.c
> > > b/drivers/media/video/omap3isp/isp.c index 503bd79..1d38d96 100644
> > > --- a/drivers/media/video/omap3isp/isp.c
> > > +++ b/drivers/media/video/omap3isp/isp.c
> > > @@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct
> isp_device
> > > *isp, u32 irqstatus)
> > >
> > > };
> > > int i;
> > >
> > > - dev_dbg(isp->dev, "");
> > > + printk(KERN_DEBUG "%s:\n", dev_driver_string(isp->dev));
>
> The original code doesn't include any \n. Is there a
> particular reason why you
> want to add one ?
[sp] Sorry, that's a mistake out of habit.
Another way to fix warning would be to make the string meaningful:
- dev_dbg(isp->dev, "");
+ dev_dbg (isp->dev, "ISP_IRQ:");
Is this better?
~sanjeev
>
> > > for (i = 0; i < ARRAY_SIZE(name); i++) {
> > >
> > > if ((1 << i) & irqstatus)
>
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] omap3: isp: fix compiler warning
2011-05-23 18:09 ` Premi, Sanjeev
@ 2011-05-25 8:14 ` Laurent Pinchart
0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2011-05-25 8:14 UTC (permalink / raw)
To: Premi, Sanjeev; +Cc: Mauro Carvalho Chehab, linux-media
Hi Sanjeev,
On Monday 23 May 2011 20:09:58 Premi, Sanjeev wrote:
> On Monday, May 23, 2011 12:56 AM Laurent Pinchart wrote:
> > On Saturday 21 May 2011 12:55:32 Mauro Carvalho Chehab wrote:
> > > Em 18-05-2011 13:06, Sanjeev Premi escreveu:
[snip]
> > > > @@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct
> > > > isp_device *isp, u32 irqstatus)
> > > >
> > > > };
> > > > int i;
> > > >
> > > > - dev_dbg(isp->dev, "");
> > > > + printk(KERN_DEBUG "%s:\n", dev_driver_string(isp->dev));
> >
> > The original code doesn't include any \n. Is there a
> > particular reason why you
> > want to add one ?
>
> [sp] Sorry, that's a mistake out of habit.
> Another way to fix warning would be to make the string meaningful:
>
> - dev_dbg(isp->dev, "");
> + dev_dbg (isp->dev, "ISP_IRQ:");
>
> Is this better?
That looks good to me. I'll queue your patch in my tree (with a space after
the colon). Thanks.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-25 8:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 16:06 [PATCH] omap3: isp: fix compiler warning Sanjeev Premi
2011-05-21 10:55 ` Mauro Carvalho Chehab
2011-05-22 19:25 ` Laurent Pinchart
2011-05-23 18:09 ` Premi, Sanjeev
2011-05-25 8:14 ` Laurent Pinchart
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.