linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] cirrusfb: fix up debug printk types
@ 2008-09-05 21:53 Krzysztof Helt
  2008-09-06  8:37 ` Geert Uytterhoeven
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Helt @ 2008-09-05 21:53 UTC (permalink / raw)
  To: Linux-fbdev-devel; +Cc: Andrew Morton

From: Krzysztof Helt <krzysztof.h1@wp.pl>

Fix debug printk types mismatch after
my earlier changes.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
 drivers/video/cirrusfb.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 50fdd33..30c47f1 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -811,21 +811,21 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
 	vga_wcrt(regbase, VGA_CRTC_V_SYNC_END, 0x20);	/* previously: 0x00) */
 
 	/* if debugging is enabled, all parameters get output before writing */
-	DPRINTK("CRT0: %ld\n", htotal);
+	DPRINTK("CRT0: %d\n", htotal);
 	vga_wcrt(regbase, VGA_CRTC_H_TOTAL, htotal);
 
-	DPRINTK("CRT1: %ld\n", hdispend);
+	DPRINTK("CRT1: %d\n", hdispend);
 	vga_wcrt(regbase, VGA_CRTC_H_DISP, hdispend);
 
-	DPRINTK("CRT2: %ld\n", var->xres / 8);
+	DPRINTK("CRT2: %d\n", var->xres / 8);
 	vga_wcrt(regbase, VGA_CRTC_H_BLANK_START, var->xres / 8);
 
 	/*  + 128: Compatible read */
-	DPRINTK("CRT3: 128+%ld\n", (htotal + 5) % 32);
+	DPRINTK("CRT3: 128+%d\n", (htotal + 5) % 32);
 	vga_wcrt(regbase, VGA_CRTC_H_BLANK_END,
 		 128 + ((htotal + 5) % 32));
 
-	DPRINTK("CRT4: %ld\n", hsyncstart);
+	DPRINTK("CRT4: %d\n", hsyncstart);
 	vga_wcrt(regbase, VGA_CRTC_H_SYNC_START, hsyncstart);
 
 	tmp = hsyncend % 32;
@@ -834,7 +834,7 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
 	DPRINTK("CRT5: %d\n", tmp);
 	vga_wcrt(regbase, VGA_CRTC_H_SYNC_END, tmp);
 
-	DPRINTK("CRT6: %ld\n", vtotal & 0xff);
+	DPRINTK("CRT6: %d\n", vtotal & 0xff);
 	vga_wcrt(regbase, VGA_CRTC_V_TOTAL, vtotal & 0xff);
 
 	tmp = 16;		/* LineCompare bit #9 */
@@ -863,19 +863,19 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
 	DPRINTK("CRT9: %d\n", tmp);
 	vga_wcrt(regbase, VGA_CRTC_MAX_SCAN, tmp);
 
-	DPRINTK("CRT10: %ld\n", vsyncstart & 0xff);
+	DPRINTK("CRT10: %d\n", vsyncstart & 0xff);
 	vga_wcrt(regbase, VGA_CRTC_V_SYNC_START, vsyncstart & 0xff);
 
-	DPRINTK("CRT11: 64+32+%ld\n", vsyncend % 16);
+	DPRINTK("CRT11: 64+32+%d\n", vsyncend % 16);
 	vga_wcrt(regbase, VGA_CRTC_V_SYNC_END, vsyncend % 16 + 64 + 32);
 
-	DPRINTK("CRT12: %ld\n", vdispend & 0xff);
+	DPRINTK("CRT12: %d\n", vdispend & 0xff);
 	vga_wcrt(regbase, VGA_CRTC_V_DISP_END, vdispend & 0xff);
 
-	DPRINTK("CRT15: %ld\n", (vdispend + 1) & 0xff);
+	DPRINTK("CRT15: %d\n", (vdispend + 1) & 0xff);
 	vga_wcrt(regbase, VGA_CRTC_V_BLANK_START, (vdispend + 1) & 0xff);
 
-	DPRINTK("CRT16: %ld\n", vtotal & 0xff);
+	DPRINTK("CRT16: %d\n", vtotal & 0xff);
 	vga_wcrt(regbase, VGA_CRTC_V_BLANK_END, vtotal & 0xff);
 
 	DPRINTK("CRT18: 0xff\n");
-- 
1.5.2.2


----------------------------------------------------------------------
Nie zwlekaj! Tapetuj z nami!
Sprawdz >>  http://link.interia.pl/f1f01


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] cirrusfb: fix up debug printk types
  2008-09-05 21:53 [PATCH 1/4] cirrusfb: fix up debug printk types Krzysztof Helt
@ 2008-09-06  8:37 ` Geert Uytterhoeven
  2008-09-06 10:13   ` Krzysztof Helt
  0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2008-09-06  8:37 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: Andrew Morton, Linux-fbdev-devel

On Fri, 5 Sep 2008, Krzysztof Helt wrote:
> From: Krzysztof Helt <krzysztof.h1@wp.pl>
> 
> Fix debug printk types mismatch after
> my earlier changes.

#define DPRINTK(fmt, args...)	pr_debug("%s: " fmt, __func__ , ## args)

unconditionally, so you always catch these?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] cirrusfb: fix up debug printk types
  2008-09-06  8:37 ` Geert Uytterhoeven
@ 2008-09-06 10:13   ` Krzysztof Helt
  2008-09-06 10:41     ` Geert Uytterhoeven
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Helt @ 2008-09-06 10:13 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Andrew Morton, Linux-fbdev-devel

On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> On Fri, 5 Sep 2008, Krzysztof Helt wrote:
> > From: Krzysztof Helt <krzysztof.h1@wp.pl>
> > 
> > Fix debug printk types mismatch after
> > my earlier changes.
> 
> #define DPRINTK(fmt, args...)	pr_debug("%s: " fmt, __func__ , ## args)
> 
> unconditionally, so you always catch these?
> 

I do not understand. Is it a suggestion to make DPRINTK unconditional?
Then, the amount of information printed should be trimmed down. It is excessive now.

I haven't used the DPRINTK because it prints too much information. I used my printk 
added at few points then remove them before creating the patch. After a second thought,
it means that it should be trimmed down as it is hardly usable (maybe convert to 
dev_dbg/dev_err etc.).

I assume the changing the patch before sending accounted for extremely poor quality 
of my patches lately. All group of cirrusfb patches had a follow up patch with some 
corrections. Even the last group requires a one-line correction to work as advertised
albeit even without the fix it works better than previously and do not make any
regression.

Regards,
Krzysztof

----------------------------------------------------------------------
Nie zwlekaj! Tapetuj z nami!
Sprawdz >>  http://link.interia.pl/f1f01


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] cirrusfb: fix up debug printk types
  2008-09-06 10:13   ` Krzysztof Helt
@ 2008-09-06 10:41     ` Geert Uytterhoeven
  2008-10-15 23:05       ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2008-09-06 10:41 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: Andrew Morton, Linux-fbdev-devel

On Sat, 6 Sep 2008, Krzysztof Helt wrote:
> On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Fri, 5 Sep 2008, Krzysztof Helt wrote:
> > > From: Krzysztof Helt <krzysztof.h1@wp.pl>
> > > 
> > > Fix debug printk types mismatch after
> > > my earlier changes.
> > 
> > #define DPRINTK(fmt, args...)	pr_debug("%s: " fmt, __func__ , ## args)
> > 
> > unconditionally, so you always catch these?
> > 
> 
> I do not understand. Is it a suggestion to make DPRINTK unconditional?

Yes.

> Then, the amount of information printed should be trimmed down. It is excessive now.

Please not that pr_debug() gets optimized away if DEBUG is not defined
( i.e. it doesn't cause excessive output), while it still performs
printf()-style format checking.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] cirrusfb: fix up debug printk types
  2008-09-06 10:41     ` Geert Uytterhoeven
@ 2008-10-15 23:05       ` Andrew Morton
  2008-10-23 18:24         ` Krzysztof Helt
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2008-10-15 23:05 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-fbdev-devel

On Sat, 6 Sep 2008 12:41:14 +0200 (CEST)
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> On Sat, 6 Sep 2008, Krzysztof Helt wrote:
> > On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
> > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Fri, 5 Sep 2008, Krzysztof Helt wrote:
> > > > From: Krzysztof Helt <krzysztof.h1@wp.pl>
> > > > 
> > > > Fix debug printk types mismatch after
> > > > my earlier changes.
> > > 
> > > #define DPRINTK(fmt, args...)	pr_debug("%s: " fmt, __func__ , ## args)
> > > 
> > > unconditionally, so you always catch these?
> > > 
> > 
> > I do not understand. Is it a suggestion to make DPRINTK unconditional?
> 
> Yes.
> 
> > Then, the amount of information printed should be trimmed down. It is excessive now.
> 
> Please not that pr_debug() gets optimized away if DEBUG is not defined
> ( i.e. it doesn't cause excessive output), while it still performs
> printf()-style format checking.
> 

hm.  No change occurred as a result of this discussion.

I guess none was really needed - I'll go ahead with the patch.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] cirrusfb: fix up debug printk types
  2008-10-15 23:05       ` Andrew Morton
@ 2008-10-23 18:24         ` Krzysztof Helt
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Helt @ 2008-10-23 18:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-fbdev-devel, Geert Uytterhoeven

On Wed, 15 Oct 2008 16:05:20 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Sat, 6 Sep 2008 12:41:14 +0200 (CEST)
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> > On Sat, 6 Sep 2008, Krzysztof Helt wrote:
> > > On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
> > > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > On Fri, 5 Sep 2008, Krzysztof Helt wrote:
> > > > > From: Krzysztof Helt <krzysztof.h1@wp.pl>
> > > > > 
> > > > > Fix debug printk types mismatch after
> > > > > my earlier changes.
> > > > 
> > > > #define DPRINTK(fmt, args...)	pr_debug("%s: " fmt, __func__ , ## args)
> > > > 
> > > > unconditionally, so you always catch these?
> > > > 
> > > 
> > > I do not understand. Is it a suggestion to make DPRINTK unconditional?
> > 
> > Yes.
> > 
> > > Then, the amount of information printed should be trimmed down. It is excessive now.
> > 
> > Please not that pr_debug() gets optimized away if DEBUG is not defined
> > ( i.e. it doesn't cause excessive output), while it still performs
> > printf()-style format checking.
> > 
> 
> hm.  No change occurred as a result of this discussion.
> 
> I guess none was really needed - I'll go ahead with the patch.
> 

I have made the change of the driver to use the dev_dbg/dev_err() functions some time ago.
However, the real life  sucked me into I have not tested this. I'll return to this when 
I sort out non-Linux stuff. I am slowly recovering and trying to go through pile of unanswered 
emails/bugs reported to my patches.

Take care,
Krzysztof

----------------------------------------------------------------------
Konkurs! Wygraj m.in. telewizor LCD!
Sprawdz >> http://link.interia.pl/f1f52 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-23 18:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-05 21:53 [PATCH 1/4] cirrusfb: fix up debug printk types Krzysztof Helt
2008-09-06  8:37 ` Geert Uytterhoeven
2008-09-06 10:13   ` Krzysztof Helt
2008-09-06 10:41     ` Geert Uytterhoeven
2008-10-15 23:05       ` Andrew Morton
2008-10-23 18:24         ` Krzysztof Helt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).