Skip to contentSkip to conversation

Fix fbcon - 'map_override' defined but not used warning

PATCH In review Gabriel C 2 participants 5 messages Jul 22, 2007 – Jul 23, 2007

Subsystems (2)
lore
Share & tools
lore

Gabriel C

author
#0 lore raw

PATCH 1/1 Fix fbcon - 'map_override' defined but not used warning

Hi,

I got this warning on current git:

...

drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used

...

---

drivers/video/console/fbcon.c +2 -0
index decfdc8..60a14de 100644
@@ -127,7 +127,9 @@ static int last_fb_vc = MAX_NR_CONSOLES - 1;
 static int fbcon_is_default = 1; 
 static int fbcon_has_exited;
 static int primary_device = -1;
+#ifndef MODULE
 static int map_override;
+#endif
 
 /* font data */
 static char fontname[40];
#2 lore raw
In reply to Gabriel C
Quoted 19 lines · Gabriel C

Hi,

I got this warning on current git:

...

drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used

...

---

drivers/video/console/fbcon.c +0 -0
index decfdc8..60a14de 100644

drivers/video/console/fbcon.c static int last_fb_vc = MAX_NR_CONSOLES - 1; · line 130

Quoted 4 lines
drivers/video/console/fbcon.c +1 -0
@@ -127,7 +127,9 @@ static int last_fb_vc = MAX_NR_CONSOLES - 1;
 static int fbcon_is_default = 1; 
 static int fbcon_has_exited;
 static int primary_device = -1;
+#ifndef MODULE

Disrecard my other comment. This should be

#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY

drivers/video/console/fbcon.c static int last_fb_vc = MAX_NR_CONSOLES - 1; · line 135

Quoted 5 lines
drivers/video/console/fbcon.c +1 -0
 static int map_override;
+#endif
 
 /* font data */
 static char fontname[40];

Tony

author
#3 lore raw
Quoted 27 lines · Antonino A. Daplas
Quoted 19 lines · Gabriel C

Hi,

I got this warning on current git:

...

drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used

...

---

drivers/video/console/fbcon.c +0 -0
index decfdc8..60a14de 100644

drivers/video/console/fbcon.c static int last_fb_vc = MAX_NR_CONSOLES - 1; · line 130

Quoted 4 lines
drivers/video/console/fbcon.c +1 -0
@@ -127,7 +127,9 @@ static int last_fb_vc = MAX_NR_CONSOLES - 1;
 static int fbcon_is_default = 1; 
 static int fbcon_has_exited;
 static int primary_device = -1;
+#ifndef MODULE

Disrecard my other comment. This should be

Quoted 1 line

#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY

You really sure ?

With that you have an compile error with !MODULE && !CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY

You are using that code checking !MODULE and you check !map_override with CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY

...

#ifndef MODULE
static int __init fb_console_setup(char *this_opt) {
...

		      con2fb_map_boot[i] =
                                                (options[j++]-'0') % FB_MAX;
                                }

                                map_override = 1; <-- should die here with !CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY && !MODULE
                        }

                        return 1;
                }

...

#endif

Quoted 10 lines

drivers/video/console/fbcon.c static int last_fb_vc = MAX_NR_CONSOLES - 1; · line 135

Quoted 6 lines
drivers/video/console/fbcon.c +1 -0
 static int map_override;
+#endif
 
 /* font data */
 static char fontname[40];

Tony

Gabriel

#4 lore raw
Quoted 28 lines · Gabriel C
Quoted 27 lines · Antonino A. Daplas
Quoted 19 lines · Gabriel C

Hi,

I got this warning on current git:

...

drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used

...

---

drivers/video/console/fbcon.c +0 -0
index decfdc8..60a14de 100644

drivers/video/console/fbcon.c static int last_fb_vc = MAX_NR_CONSOLES - 1; · line 130

Quoted 4 lines
drivers/video/console/fbcon.c +1 -0
@@ -127,7 +127,9 @@ static int last_fb_vc = MAX_NR_CONSOLES - 1;
 static int fbcon_is_default = 1; 
 static int fbcon_has_exited;
 static int primary_device = -1;
+#ifndef MODULE

Disrecard my other comment. This should be

Quoted 3 lines
Quoted 1 line

#ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY

You really sure ?

Yes, I realize that. I already have a patch in my tree that will fix this properly.

Tony