omap3: isp: fix compiler warning
PATCH 1/1 omap3: isp: fix compiler warning
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.
---
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(-)
drivers/media/video/omap3isp/isp.c +1 -1
@@ -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)
Signature · 1 line
1.7.2.2
Em 18-05-2011 13:06, Sanjeev Premi escreveu:
Quoted 10 lines
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_printfformat stringSince
printk()is used in next few statements, same was used here as well.Signed-off-by Sanjeev Premi <[email protected]>
Quoted 8 lines
---
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.
Quoted 11 lines
drivers/media/video/omap3isp/isp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/media/video/omap3isp/isp.c +0
-0
drivers/media/video/omap3isp/isp.c static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus) · line 393
Quoted 8 lines
drivers/media/video/omap3isp/isp.c +1
-1@@ -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
Hi Mauro and Sanjeev,
Quoted 14 lines · On Saturday 21 May 2011 12:55:32 Mauro Carvalho Chehab wrote:
Em 18-05-2011 13:06, Sanjeev Premi escreveu:
Quoted 13 lines
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_printfformat stringSince
printk()is used in next few statements, same was used here as well.Signed-off-by Sanjeev Premi <[email protected]>---
Quoted 8 lines
Quoted 6 lines
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().
Quoted 10 lines
Quoted 10 lines
drivers/media/video/omap3isp/isp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/media/video/omap3isp/isp.cindex 503bd79..1d38d96 100644drivers/media/video/omap3isp/isp.c +0
-0@@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus)
Quoted 5 lines
drivers/media/video/omap3isp/isp.c static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus) · line 390
Quoted 5 lines
drivers/media/video/omap3isp/isp.c +1
-1};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 ?
Quoted 3 lines
Quoted 3 lines
drivers/media/video/omap3isp/isp.c +0
-0for (i =0 ; i <ARRAY_SIZE (name); i++) {if ((1 << i) & irqstatus)
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 28 lines
-----Original Message-----
From: Laurent Pinchart [mailto:[email protected]]
Sent: Monday, May 23, 2011 12:56 AM
To: Mauro Carvalho Chehab
Cc: Premi, Sanjeev; [email protected]
Subject: Re: [PATCH] omap3: isp: fix compiler warningHi Mauro and Sanjeev,
Quoted 18 lines · On Saturday 21 May 2011 12:55:32 Mauro Carvalho Chehab wrote:
Em 18-05-2011 13:06, Sanjeev Premi escreveu:
Quoted 17 lines
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_printfformat stringSince
printk()is used in next few statements, same was used here as well.Signed-off-by Sanjeev Premi <[email protected]>---
Actually full block can be converted to
dev_dbg()as well; but i am not sure about original intent of the mix.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
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_CONTwithdev_dbg().
[sp] I did realize that hence changed only the call to dev_dbg.
Quoted 15 lines
Quoted 9 lines
drivers/media/video/omap3isp/isp.c static inline void isp_isr_dbg(struct
Quoted 9 lines
drivers/media/video/omap3isp/isp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/media/video/omap3isp/isp.cindex 503bd79..1d38d96 100644drivers/media/video/omap3isp/isp.c +0
-0@@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct
isp_deviceQuoted 5 lines
Quoted 5 lines
drivers/media/video/omap3isp/isp.c +0
-0*isp, u32 irqstatus) };int i;
Quoted 6 lines
Quoted 2 lines
drivers/media/video/omap3isp/isp.c static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus) · line 390
Quoted 2 lines
drivers/media/video/omap3isp/isp.c +1
-1-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
Quoted 10 lines
Quoted 4 lines
Quoted 4 lines
drivers/media/video/omap3isp/isp.c +0
-0for (i =0 ; i <ARRAY_SIZE (name); i++) {if ((1 << i) & irqstatus)
Signature · 3 lines
Regards, Laurent Pinchart
Hi Sanjeev,
Quoted 3 lines · Sanjeev
Quoted 2 lines · Laurent Pinchart
Quoted 1 line · On Saturday 21 May 2011 12:55:32 Mauro Carvalho Chehab wrote:
Em 18-05-2011 13:06, Sanjeev Premi escreveu:
[snip]
Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
(quoted diff) +0
-0@@ -387,7 +387,7 @@ static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus) }; int i;Quoted 6 lines
Quoted 2 lines
drivers/media/video/omap3isp/isp.c static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus) · line 390
Quoted 2 lines
drivers/media/video/omap3isp/isp.c +1
-1-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:
drivers/media/video/omap3isp/isp.c static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus)
Quoted 4 lines
drivers/media/video/omap3isp/isp.c +1
-1-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.
Signature · 3 lines
Regards, Laurent Pinchart