linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] fbdev: fb_create_modedb() non-static `int first = 1; '
@ 2007-08-08 12:11 Geert Uytterhoeven
  2007-08-08 21:26 ` Antonino A. Daplas
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2007-08-08 12:11 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1348 bytes --]


From looking at the code flow, `int first' in fb_create_modedb() should be
static.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
Or should it be initialized to 1 outside the loop?

 drivers/video/fbmon.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -606,7 +606,7 @@ static struct fb_videomode *fb_create_mo
 	pr_debug("   Detailed Timings\n");
 	block = edid + DETAILED_TIMING_DESCRIPTIONS_START;
 	for (i = 0; i < 4; i++, block += DETAILED_TIMING_DESCRIPTION_SIZE) {
-		int first = 1;
+		static int first = 1;
 
 		if (!(block[0] == 0x00 && block[1] == 0x00)) {
 			get_detailed_timing(block, &mode[num]);

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

[-- Attachment #2: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #3: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

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

* Re: [PATCH/RFC] fbdev: fb_create_modedb() non-static `int first = 1; '
  2007-08-08 12:11 [PATCH/RFC] fbdev: fb_create_modedb() non-static `int first = 1; ' Geert Uytterhoeven
@ 2007-08-08 21:26 ` Antonino A. Daplas
  0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2007-08-08 21:26 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Geert.Uytterhoeven

On Wed, 2007-08-08 at 14:11 +0200, Geert Uytterhoeven wrote:
> >From looking at the code flow, `int first' in fb_create_modedb() should be
> static.
> 
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> ---
> Or should it be initialized to 1 outside the loop?

It should be outside the loop.  Thanks.

Tony



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

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

end of thread, other threads:[~2007-08-08 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 12:11 [PATCH/RFC] fbdev: fb_create_modedb() non-static `int first = 1; ' Geert Uytterhoeven
2007-08-08 21:26 ` Antonino A. Daplas

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).