Skip to contentSkip to conversation

sparc64:tsb.c:use array size macro rather than number

PATCH Applied Doug 2 participants 2 messages Mar 7, 2014 – Mar 17, 2014 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

Doug

author
#0 lore raw

PATCH 1/1 sparc64:tsb.c:use array size macro rather than number

From: Doug Wilson <[email protected]>

This is a small patch which uses ARRAY_SIZE macro rather than a number to make code readability better.

---
 arch/sparc/mm/tsb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/mm/tsb.c +1 -1
index 3b3a360..f5d506f 100644
@@ -273,7 +273,7 @@ void __init pgtable_cache_init(void)
 		prom_halt();
 	}
 
-	for (i = 0; i < 8; i++) {
+	for (i = 0; i < ARRAY_SIZE(tsb_cache_names); i++) {
 		unsigned long size = 8192 << i;
 		const char *name = tsb_cache_names[i];
 
Signature · 1 line
1.8.1.2