Patchwork [04/11] lpddr: replace open-coded ARRAY_SIZE with macro

login
register
mail settings
Submitter Jim Cromie
Date April 11, 2012, 12:55 a.m.
Message ID <1334105756-9161-1-git-send-email-jim.cromie@gmail.com>
Download mbox | patch
Permalink /patch/151720/
State Accepted
Commit 287558fe0e06a85c32863ec9204ed39fc218c5e3
Headers show

Comments

Jim Cromie - April 11, 2012, 12:55 a.m.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 drivers/mtd/lpddr/qinfo_probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Artem Bityutskiy - April 21, 2012, 2:19 p.m.
On Tue, 2012-04-10 at 18:55 -0600, Jim Cromie wrote:
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>

Pushed to l2-mtd.git, thanks!

Patch

diff --git a/drivers/mtd/lpddr/qinfo_probe.c b/drivers/mtd/lpddr/qinfo_probe.c
index dbfe17b..45abed6 100644
--- a/drivers/mtd/lpddr/qinfo_probe.c
+++ b/drivers/mtd/lpddr/qinfo_probe.c
@@ -57,7 +57,7 @@  static struct qinfo_query_info qinfo_array[] = {
 
 static long lpddr_get_qinforec_pos(struct map_info *map, char *id_str)
 {
-	int qinfo_lines = sizeof(qinfo_array)/sizeof(struct qinfo_query_info);
+	int qinfo_lines = ARRAY_SIZE(qinfo_array);
 	int i;
 	int bankwidth = map_bankwidth(map) * 8;
 	int major, minor;