mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] sparc64:tsb.c:use array size macro rather than number
@ 2014-03-04 18:04 Doug
  2014-03-06 21:33 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Doug @ 2014-03-04 18:04 UTC (permalink / raw)
  To: sparclinux; +Cc: linux-kernel, Doug

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

Signed-off-by: Doug <doug.lkml@gmail.com>
---
 arch/sparc/mm/tsb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c
index 3b3a360..f5d506f 100644
--- a/arch/sparc/mm/tsb.c
+++ b/arch/sparc/mm/tsb.c
@@ -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];
 
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 1/1] sparc64:tsb.c:use array size macro rather than number
@ 2014-03-07 10:59 Doug
  2014-03-17 19:56 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Doug @ 2014-03-07 10:59 UTC (permalink / raw)
  To: sparclinux; +Cc: linux-kernel, Doug Wilson

From: Doug Wilson <doug.lkml@gmail.com>

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

Signed-off-by: Doug Wilson <doug.lkml@gmail.com>
---
 arch/sparc/mm/tsb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c
index 3b3a360..f5d506f 100644
--- a/arch/sparc/mm/tsb.c
+++ b/arch/sparc/mm/tsb.c
@@ -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];
 
-- 
1.8.1.2


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

end of thread, other threads:[~2014-03-17 19:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-04 18:04 [PATCH 1/1] sparc64:tsb.c:use array size macro rather than number Doug
2014-03-06 21:33 ` David Miller
2014-03-07 10:51   ` Doug Wilson
2014-03-07 10:59 Doug
2014-03-17 19:56 ` David Miller

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

all inboxes | Powered by JetHome®