Skip to contentSkip to conversation

lpddr: replace open-coded ARRAY_SIZE with macro

PATCH Applied Jim Cromie 2 participants 2 messages Apr 11, 2012 – Apr 21, 2012 Memory technology devices (MTD)

lore
Share & tools
lore

Jim Cromie

author
#0 lore raw

PATCH 4/11 lpddr: replace open-coded ARRAY_SIZE with macro

---
 drivers/mtd/lpddr/qinfo_probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/lpddr/qinfo_probe.c +1 -1
index dbfe17b..45abed6 100644
@@ -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;
Signature · 1 line
1.7.8.1