diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-08-29 16:54:38 +0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 17:45:03 +0400 |
commit | fbf3c54239f77a82218002e0c511819e274e7cd4 (patch) | |
tree | d891375d8b14b411b4f2fb9a28fb77ebb71489f3 | |
parent | 6668022c7bde3fdc96d3d257294a7216c7a46829 (diff) | |
download | linux-fbf3c54239f77a82218002e0c511819e274e7cd4.tar.xz |
s390/processor: use ARRAY_SIZE instead of hard coded value
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/kernel/processor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index 63f3b76e37a9..753c41d0ffd3 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c @@ -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"); |