From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] common/lcd.c: use ARRAY_SIZE
Date: Fri, 27 Apr 2012 16:41:06 +0200 [thread overview]
Message-ID: <1335537666-4893-1-git-send-email-agust@denx.de> (raw)
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
next reply other threads:[~2012-04-27 14:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 14:41 Anatolij Gustschin [this message]
2012-05-24 20:56 ` [U-Boot] [PATCH 1/3] common/lcd.c: use ARRAY_SIZE Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335537666-4893-1-git-send-email-agust@denx.de \
--to=agust@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox