All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] radeonfb: screeninfo initialization cleanup
       [not found] <200410281712.i9SHCxDe025312@hera.kernel.org>
@ 2004-10-29 18:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2004-10-29 18:49 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Andrew Morton, Linus Torvalds, Benjamin Herrenschmidt,
	Linux Frame Buffer Device Development, Linux Kernel Development

On Thu, 28 Oct 2004, Linux Kernel Mailing List wrote:
> ChangeSet 1.2265, 2004/10/28 08:23:51-07:00, penberg@cs.helsinki.fi
> 
> 	[PATCH] radeonfb: screeninfo initialization cleanup
> 	
> 	This patch changes the initialization of radeonfb_default_var to use named
> 	initializers and avoids explicitly setting fields that are automatically
> 	zeroed.

> --- a/drivers/video/aty/radeon_monitor.c	2004-10-28 10:13:09 -07:00
> +++ b/drivers/video/aty/radeon_monitor.c	2004-10-28 10:13:09 -07:00
> @@ -7,10 +7,25 @@
>  #endif /* CONFIG_PPC_OF */
>  
>  static struct fb_var_screeninfo radeonfb_default_var = {
> -        640, 480, 640, 480, 0, 0, 8, 0,
> -        {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
> -        0, 0, -1, -1, 0, 39721, 40, 24, 32, 11, 96, 2,
> -        0, FB_VMODE_NONINTERLACED
> +	.xres		= 640,
> +	.yres		= 480,
> +	.xres_virtual	= 640,
> +	.yres_virtual	= 480,
> +	.bits_per_pixel = 8,
> +	.red		= { 0, 6, 0 },
                               ^
> +	.green		= { 0, 6, 0 },
                               ^
> +	.blue		= { 0, 6, 0 },
                               ^
Should be 8 these days (256 usable color palette entries).
And why not use `{ .length = 8 }' if you don't care about automatically zeroed
fields?

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:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

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

* Re: [PATCH] radeonfb: screeninfo initialization cleanup
@ 2004-10-29 18:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2004-10-29 18:49 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Andrew Morton, Linus Torvalds, Benjamin Herrenschmidt,
	Linux Frame Buffer Device Development, Linux Kernel Development

On Thu, 28 Oct 2004, Linux Kernel Mailing List wrote:
> ChangeSet 1.2265, 2004/10/28 08:23:51-07:00, penberg@cs.helsinki.fi
> 
> 	[PATCH] radeonfb: screeninfo initialization cleanup
> 	
> 	This patch changes the initialization of radeonfb_default_var to use named
> 	initializers and avoids explicitly setting fields that are automatically
> 	zeroed.

> --- a/drivers/video/aty/radeon_monitor.c	2004-10-28 10:13:09 -07:00
> +++ b/drivers/video/aty/radeon_monitor.c	2004-10-28 10:13:09 -07:00
> @@ -7,10 +7,25 @@
>  #endif /* CONFIG_PPC_OF */
>  
>  static struct fb_var_screeninfo radeonfb_default_var = {
> -        640, 480, 640, 480, 0, 0, 8, 0,
> -        {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
> -        0, 0, -1, -1, 0, 39721, 40, 24, 32, 11, 96, 2,
> -        0, FB_VMODE_NONINTERLACED
> +	.xres		= 640,
> +	.yres		= 480,
> +	.xres_virtual	= 640,
> +	.yres_virtual	= 480,
> +	.bits_per_pixel = 8,
> +	.red		= { 0, 6, 0 },
                               ^
> +	.green		= { 0, 6, 0 },
                               ^
> +	.blue		= { 0, 6, 0 },
                               ^
Should be 8 these days (256 usable color palette entries).
And why not use `{ .length = 8 }' if you don't care about automatically zeroed
fields?

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

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

* [PATCH] radeonfb: more initializer fixes
  2004-10-29 18:49   ` Geert Uytterhoeven
  (?)
@ 2004-10-29 20:11   ` Pekka Enberg
  -1 siblings, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2004-10-29 20:11 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Andrew Morton, Linus Torvalds, Benjamin Herrenschmidt,
	Linux Frame Buffer Device Development, Linux Kernel Development

Use 8-bit palette entries for radeonfb and avoid zero-initialization
as suggested by Geert Uytterhoeven.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---

 radeon_monitor.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Index: 2.6.10-rc1-mm1/drivers/video/aty/radeon_monitor.c
===================================================================
--- 2.6.10-rc1-mm1.orig/drivers/video/aty/radeon_monitor.c	2004-10-29 11:07:54.000000000 +0300
+++ 2.6.10-rc1-mm1/drivers/video/aty/radeon_monitor.c	2004-10-29 23:02:58.854952680 +0300
@@ -12,9 +12,9 @@
 	.xres_virtual	= 640,
 	.yres_virtual	= 480,
 	.bits_per_pixel = 8,
-	.red		= { 0, 6, 0 },
-	.green		= { 0, 6, 0 },
-	.blue		= { 0, 6, 0 },
+	.red		= { .length = 8 },
+	.green		= { .length = 8 },
+	.blue		= { .length = 8 },
 	.activate	= FB_ACTIVATE_NOW,
 	.height		= -1,
 	.width		= -1,

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

end of thread, other threads:[~2004-10-30  1:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200410281712.i9SHCxDe025312@hera.kernel.org>
2004-10-29 18:49 ` [PATCH] radeonfb: screeninfo initialization cleanup Geert Uytterhoeven
2004-10-29 18:49   ` Geert Uytterhoeven
2004-10-29 20:11   ` [PATCH] radeonfb: more initializer fixes Pekka Enberg

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.