]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
s390/processor: use ARRAY_SIZE instead of hard coded value
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 29 Aug 2012 12:54:38 +0000 (14:54 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 17 Sep 2012 09:30:21 +0000 (11:30 +0200)
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/processor.c

index 63f3b76e37a981f307bd02c799e937d711478298..753c41d0ffd3ae186e01a2345cd8f6b27e878dd1 100644 (file)
@@ -39,7 +39,7 @@ void __cpuinit cpu_init(void)
  */
 static int show_cpuinfo(struct seq_file *m, void *v)
 {
-       static const char *hwcap_str[11] = {
+       static const char *hwcap_str[] = {
                "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
                "edat", "etf3eh", "highgprs", "te"
        };
@@ -54,7 +54,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                           num_online_cpus(), loops_per_jiffy/(500000/HZ),
                           (loops_per_jiffy/(5000/HZ))%100);
                seq_puts(m, "features\t: ");
-               for (i = 0; i < 11; i++)
+               for (i = 0; i < ARRAY_SIZE(hwcap_str); i++)
                        if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
                                seq_printf(m, "%s ", hwcap_str[i]);
                seq_puts(m, "\n");