Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
fbf3c542 6668022c

+2 -2
+2 -2
arch/s390/kernel/processor.c
··· 39 39 */ 40 40 static int show_cpuinfo(struct seq_file *m, void *v) 41 41 { 42 - static const char *hwcap_str[11] = { 42 + static const char *hwcap_str[] = { 43 43 "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", 44 44 "edat", "etf3eh", "highgprs", "te" 45 45 }; ··· 54 54 num_online_cpus(), loops_per_jiffy/(500000/HZ), 55 55 (loops_per_jiffy/(5000/HZ))%100); 56 56 seq_puts(m, "features\t: "); 57 - for (i = 0; i < 11; i++) 57 + for (i = 0; i < ARRAY_SIZE(hwcap_str); i++) 58 58 if (hwcap_str[i] && (elf_hwcap & (1UL << i))) 59 59 seq_printf(m, "%s ", hwcap_str[i]); 60 60 seq_puts(m, "\n");