public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix fbcon - 'map_override' defined but not used warning
@ 2007-07-22 16:23 Gabriel C
  2007-07-22 22:56 ` Antonino A. Daplas
  2007-07-23  6:18 ` Antonino A. Daplas
  0 siblings, 2 replies; 5+ messages in thread
From: Gabriel C @ 2007-07-22 16:23 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: adaplas

Hi,

I got this warning on current git:

...

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

...

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>

---

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index decfdc8..60a14de 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -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];

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

* Re: [PATCH] Fix fbcon - 'map_override' defined but not used warning
  2007-07-22 16:23 [PATCH] Fix fbcon - 'map_override' defined but not used warning Gabriel C
@ 2007-07-22 22:56 ` Antonino A. Daplas
  2007-07-23  6:18 ` Antonino A. Daplas
  1 sibling, 0 replies; 5+ messages in thread
From: Antonino A. Daplas @ 2007-07-22 22:56 UTC (permalink / raw)
  To: Gabriel C; +Cc: Linux Kernel Mailing List

On Sun, 2007-07-22 at 18:23 +0200, Gabriel C wrote:
> Hi,
> 
> I got this warning on current git:
> 
> ...
> 
> drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used
> 
> ...
> 
> Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Acked-by: Antonino Daplas <adaplas@gmail.com>

Thanks.

Tony



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

* Re: [PATCH] Fix fbcon - 'map_override' defined but not used warning
  2007-07-22 16:23 [PATCH] Fix fbcon - 'map_override' defined but not used warning Gabriel C
  2007-07-22 22:56 ` Antonino A. Daplas
@ 2007-07-23  6:18 ` Antonino A. Daplas
  2007-07-23 12:07   ` Gabriel C
  1 sibling, 1 reply; 5+ messages in thread
From: Antonino A. Daplas @ 2007-07-23  6:18 UTC (permalink / raw)
  To: Gabriel C; +Cc: Linux Kernel Mailing List

On Sun, 2007-07-22 at 18:23 +0200, Gabriel C wrote:
> Hi,
> 
> I got this warning on current git:
> 
> ...
> 
> drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used
> 
> ...
> 
> Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
> 
> ---
> 
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index decfdc8..60a14de 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -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

>  static int map_override;
> +#endif
>  
>  /* font data */
>  static char fontname[40];

Tony


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

* Re: [PATCH] Fix fbcon - 'map_override' defined but not used warning
  2007-07-23  6:18 ` Antonino A. Daplas
@ 2007-07-23 12:07   ` Gabriel C
  2007-07-23 12:44     ` Antonino A. Daplas
  0 siblings, 1 reply; 5+ messages in thread
From: Gabriel C @ 2007-07-23 12:07 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Linux Kernel Mailing List

Antonino A. Daplas wrote:
> On Sun, 2007-07-22 at 18:23 +0200, Gabriel C wrote:
>> Hi,
>>
>> I got this warning on current git:
>>
>> ...
>>
>> drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used
>>
>> ...
>>
>> Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
>>
>> ---
>>
>> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
>> index decfdc8..60a14de 100644
>> --- a/drivers/video/console/fbcon.c
>> +++ b/drivers/video/console/fbcon.c
>> @@ -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

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


> 
>>  static int map_override;
>> +#endif
>>  
>>  /* font data */
>>  static char fontname[40];
> 
> Tony
> 
> 

Gabriel

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

* Re: [PATCH] Fix fbcon - 'map_override' defined but not used warning
  2007-07-23 12:07   ` Gabriel C
@ 2007-07-23 12:44     ` Antonino A. Daplas
  0 siblings, 0 replies; 5+ messages in thread
From: Antonino A. Daplas @ 2007-07-23 12:44 UTC (permalink / raw)
  To: Gabriel C; +Cc: Linux Kernel Mailing List

On Mon, 2007-07-23 at 14:07 +0200, Gabriel C wrote:
> Antonino A. Daplas wrote:
> > On Sun, 2007-07-22 at 18:23 +0200, Gabriel C wrote:
> >> Hi,
> >>
> >> I got this warning on current git:
> >>
> >> ...
> >>
> >> drivers/video/console/fbcon.c:130: warning: 'map_override' defined but not used
> >>
> >> ...
> >>
> >> Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
> >>
> >> ---
> >>
> >> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> >> index decfdc8..60a14de 100644
> >> --- a/drivers/video/console/fbcon.c
> >> +++ b/drivers/video/console/fbcon.c
> >> @@ -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
> 
> You really sure ? 

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

Tony



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

end of thread, other threads:[~2007-07-23 12:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22 16:23 [PATCH] Fix fbcon - 'map_override' defined but not used warning Gabriel C
2007-07-22 22:56 ` Antonino A. Daplas
2007-07-23  6:18 ` Antonino A. Daplas
2007-07-23 12:07   ` Gabriel C
2007-07-23 12:44     ` 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