[PATCH 1/4] cirrusfb: fix up debug printk types

Subsystems: framebuffer layer, the rest

STALE6572d

6 messages, 3 authors, 2008-10-23 · open the first message on its own page

[PATCH 1/4] cirrusfb: fix up debug printk types

From: Krzysztof Helt <hidden>
Date: 2008-09-05 21:46:18

From: Krzysztof Helt <redacted>

Fix debug printk types mismatch after
my earlier changes.

Signed-off-by: Krzysztof Helt <redacted>
---
 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=/

Re: [PATCH 1/4] cirrusfb: fix up debug printk types

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2008-09-06 08:37:40

On Fri, 5 Sep 2008, Krzysztof Helt wrote:
From: Krzysztof Helt <redacted>

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=/

Re: [PATCH 1/4] cirrusfb: fix up debug printk types

From: Krzysztof Helt <hidden>
Date: 2008-09-06 10:35:54

On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
Geert Uytterhoeven [off-list ref] wrote:
On Fri, 5 Sep 2008, Krzysztof Helt wrote:
quoted
From: Krzysztof Helt <redacted>

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=/

Re: [PATCH 1/4] cirrusfb: fix up debug printk types

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2008-09-06 10:41:18

On Sat, 6 Sep 2008, Krzysztof Helt wrote:
On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
Geert Uytterhoeven [off-list ref] wrote:
quoted
On Fri, 5 Sep 2008, Krzysztof Helt wrote:
quoted
From: Krzysztof Helt <redacted>

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=/

Re: [PATCH 1/4] cirrusfb: fix up debug printk types

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2008-10-15 23:06:13

On Sat, 6 Sep 2008 12:41:14 +0200 (CEST)
Geert Uytterhoeven [off-list ref] wrote:
On Sat, 6 Sep 2008, Krzysztof Helt wrote:
quoted
On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
Geert Uytterhoeven [off-list ref] wrote:
quoted
On Fri, 5 Sep 2008, Krzysztof Helt wrote:
quoted
From: Krzysztof Helt <redacted>

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.
quoted
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=/

Re: [PATCH 1/4] cirrusfb: fix up debug printk types

From: Krzysztof Helt <hidden>
Date: 2008-10-23 18:22:13

On Wed, 15 Oct 2008 16:05:20 -0700
Andrew Morton [off-list ref] wrote:
On Sat, 6 Sep 2008 12:41:14 +0200 (CEST)
Geert Uytterhoeven [off-list ref] wrote:
quoted
On Sat, 6 Sep 2008, Krzysztof Helt wrote:
quoted
On Sat, 6 Sep 2008 10:37:27 +0200 (CEST)
Geert Uytterhoeven [off-list ref] wrote:
quoted
On Fri, 5 Sep 2008, Krzysztof Helt wrote:
quoted
From: Krzysztof Helt <redacted>

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.
quoted
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=/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help