public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] common/lcd.c: use ARRAY_SIZE
@ 2012-04-27 14:41 Anatolij Gustschin
  2012-05-24 20:56 ` Anatolij Gustschin
  0 siblings, 1 reply; 2+ messages in thread
From: Anatolij Gustschin @ 2012-04-27 14:41 UTC (permalink / raw)
  To: u-boot

Use available macro for obtaining the size of bmp_logo_palette[]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 common/lcd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/lcd.c b/common/lcd.c
index bf1a6a9..0ea45d0 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -523,7 +523,7 @@ void bitmap_plot (int x, int y)
 
 	debug ("Logo: width %d  height %d  colors %d  cmap %d\n",
 		BMP_LOGO_WIDTH, BMP_LOGO_HEIGHT, BMP_LOGO_COLORS,
-		(int)(sizeof(bmp_logo_palette)/(sizeof(ushort))));
+		ARRAY_SIZE(bmp_logo_palette));
 
 	bmap = &bmp_logo_bitmap[0];
 	fb   = (uchar *)(lcd_base + y * lcd_line_length + x);
@@ -548,7 +548,7 @@ void bitmap_plot (int x, int y)
 		WATCHDOG_RESET();
 
 		/* Set color map */
-		for (i=0; i<(sizeof(bmp_logo_palette)/(sizeof(ushort))); ++i) {
+		for (i = 0; i < ARRAY_SIZE(bmp_logo_palette); ++i) {
 			ushort colreg = bmp_logo_palette[i];
 #ifdef CONFIG_ATMEL_LCD
 			uint lut_entry;
-- 
1.7.7.6

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

* [U-Boot] [PATCH 1/3] common/lcd.c: use ARRAY_SIZE
  2012-04-27 14:41 [U-Boot] [PATCH 1/3] common/lcd.c: use ARRAY_SIZE Anatolij Gustschin
@ 2012-05-24 20:56 ` Anatolij Gustschin
  0 siblings, 0 replies; 2+ messages in thread
From: Anatolij Gustschin @ 2012-05-24 20:56 UTC (permalink / raw)
  To: u-boot

On Fri, 27 Apr 2012 16:41:06 +0200
Anatolij Gustschin <agust@denx.de> wrote:

> Use available macro for obtaining the size of bmp_logo_palette[]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  common/lcd.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-video/master.

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

end of thread, other threads:[~2012-05-24 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 14:41 [U-Boot] [PATCH 1/3] common/lcd.c: use ARRAY_SIZE Anatolij Gustschin
2012-05-24 20:56 ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox