All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix warning in aty128fb
@ 2009-01-20 16:18 Daniele Venzano
  2009-01-23 10:02 ` Richard Genoud
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Daniele Venzano @ 2009-01-20 16:18 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

The attached patch fixes a "defined but not used" warning in aty128fb
when CONFIG_PMAC_BACKLIGHT is not defined. Made against 2.6.28.1.

If all is well I think I will make other similar patches, fixing warnings
and errors found with randconfig.

Signed-off-by: Daniele Venzano <venza@brownhat.org>


[-- Attachment #2: aty128fb_fix_warning.diff --]
[-- Type: text/x-diff, Size: 365 bytes --]

--- linux-2.6.28.1/drivers/video/aty/aty128fb.c.old	2009-01-20 16:08:06.000000000 +0100
+++ linux-2.6.28.1/drivers/video/aty/aty128fb.c	2009-01-20 16:08:13.000000000 +0100
@@ -359,8 +359,6 @@ static int mtrr = 1;
 
 #ifdef CONFIG_PMAC_BACKLIGHT
 static int backlight __devinitdata = 1;
-#else
-static int backlight __devinitdata = 0;
 #endif
 
 /* PLL constants */

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

* Re: [PATCH] Fix warning in aty128fb
  2009-01-20 16:18 [PATCH] Fix warning in aty128fb Daniele Venzano
@ 2009-01-23 10:02 ` Richard Genoud
  2009-01-23 10:39 ` Daniele Venzano
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Genoud @ 2009-01-23 10:02 UTC (permalink / raw)
  To: kernel-janitors

2009/1/20 Daniele Venzano <venza@brownhat.org>:
> The attached patch fixes a "defined but not used" warning in aty128fb
> when CONFIG_PMAC_BACKLIGHT is not defined. Made against 2.6.28.1.
>
> If all is well I think I will make other similar patches, fixing warnings
> and errors found with randconfig.
>
> Signed-off-by: Daniele Venzano <venza@brownhat.org>

This patch breaks the kernel compilation if aty128fb is compiled in
the kernel (not as a module) see line 1660 :

<http://lxr.linux.no/linux+v2.6.28.1/drivers/video/aty/aty128fb.c#L1660>

(and please, try to post the patch in the email body, not as an
attachement if you can (cf Documentation/email-clients.txt ))

richard.

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

* Re: [PATCH] Fix warning in aty128fb
  2009-01-20 16:18 [PATCH] Fix warning in aty128fb Daniele Venzano
  2009-01-23 10:02 ` Richard Genoud
@ 2009-01-23 10:39 ` Daniele Venzano
  2009-01-23 13:20 ` Richard Genoud
  2009-01-23 15:56 ` Richard Genoud
  3 siblings, 0 replies; 5+ messages in thread
From: Daniele Venzano @ 2009-01-23 10:39 UTC (permalink / raw)
  To: kernel-janitors

I changed the patch to not define backlight only in case the driver is
compiled as module. Now it compiles both statically or as module without
errors or warnings.

Patch is against 2.6.28.1

Signed-off-by: Daniele Venzano <venza@brownhat.org>

--- linux-2.6.28.1/drivers/video/aty/aty128fb.c.old	2009-01-20 16:08:06.000000000 +0100
+++ linux-2.6.28.1/drivers/video/aty/aty128fb.c	2009-01-23 11:34:16.000000000 +0100
@@ -360,8 +360,10 @@ static int mtrr = 1;
 #ifdef CONFIG_PMAC_BACKLIGHT
 static int backlight __devinitdata = 1;
 #else
+#ifndef MODULE
 static int backlight __devinitdata = 0;
 #endif
+#endif
 
 /* PLL constants */
 struct aty128_constants {



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

* Re: [PATCH] Fix warning in aty128fb
  2009-01-20 16:18 [PATCH] Fix warning in aty128fb Daniele Venzano
  2009-01-23 10:02 ` Richard Genoud
  2009-01-23 10:39 ` Daniele Venzano
@ 2009-01-23 13:20 ` Richard Genoud
  2009-01-23 15:56 ` Richard Genoud
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Genoud @ 2009-01-23 13:20 UTC (permalink / raw)
  To: kernel-janitors

2009/1/23 Daniele Venzano <venza@brownhat.org>:
> I changed the patch to not define backlight only in case the driver is
> compiled as module. Now it compiles both statically or as module without
> errors or warnings.
>
> Patch is against 2.6.28.1
>
> Signed-off-by: Daniele Venzano <venza@brownhat.org>
>
> --- linux-2.6.28.1/drivers/video/aty/aty128fb.c.old     2009-01-20 16:08:06.000000000 +0100
> +++ linux-2.6.28.1/drivers/video/aty/aty128fb.c 2009-01-23 11:34:16.000000000 +0100
> @@ -360,8 +360,10 @@ static int mtrr = 1;
>  #ifdef CONFIG_PMAC_BACKLIGHT
>  static int backlight __devinitdata = 1;
>  #else
> +#ifndef MODULE
>  static int backlight __devinitdata = 0;
>  #endif
> +#endif
>
>  /* PLL constants */
>  struct aty128_constants {
>

[Added CC:Brad]

Reviewed-by: Richard Genoud <richard.genoud@gmail.com>

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

* Re: [PATCH] Fix warning in aty128fb
  2009-01-20 16:18 [PATCH] Fix warning in aty128fb Daniele Venzano
                   ` (2 preceding siblings ...)
  2009-01-23 13:20 ` Richard Genoud
@ 2009-01-23 15:56 ` Richard Genoud
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Genoud @ 2009-01-23 15:56 UTC (permalink / raw)
  To: kernel-janitors

2009/1/23 Richard Genoud <richard.genoud@gmail.com>:
> 2009/1/23 Daniele Venzano <venza@brownhat.org>:
>> I changed the patch to not define backlight only in case the driver is
>> compiled as module. Now it compiles both statically or as module without
>> errors or warnings.
>>
>> Patch is against 2.6.28.1
>>
>> Signed-off-by: Daniele Venzano <venza@brownhat.org>
>>
>> --- linux-2.6.28.1/drivers/video/aty/aty128fb.c.old     2009-01-20 16:08:06.000000000 +0100
>> +++ linux-2.6.28.1/drivers/video/aty/aty128fb.c 2009-01-23 11:34:16.000000000 +0100
>> @@ -360,8 +360,10 @@ static int mtrr = 1;
>>  #ifdef CONFIG_PMAC_BACKLIGHT
>>  static int backlight __devinitdata = 1;
>>  #else
>> +#ifndef MODULE
>>  static int backlight __devinitdata = 0;
>>  #endif
>> +#endif
>>
>>  /* PLL constants */
>>  struct aty128_constants {
>>
>
> [Added CC:Brad]
>
> Reviewed-by: Richard Genoud <richard.genoud@gmail.com>
>

sorry, there's still an error in the path (I reviewed a little bit to fast...).
the compilation breaks if "ATI Rage128 display support" is compile as
a module and "Support for backlight control (FB_ATY128_BACKLIGHT)" is
set
(cf line 1997)

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

end of thread, other threads:[~2009-01-23 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 16:18 [PATCH] Fix warning in aty128fb Daniele Venzano
2009-01-23 10:02 ` Richard Genoud
2009-01-23 10:39 ` Daniele Venzano
2009-01-23 13:20 ` Richard Genoud
2009-01-23 15:56 ` Richard Genoud

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.