lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 8 Aug 2008 14:52:23 -0700 From: Yinghai Lu <yhlu.kernel@...il.com> To: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>, "H. Peter Anvin" <hpa@...or.com>, "Eric W. Biederman" <ebiederm@...ssion.com>, Dhaval Giani <dhaval@...ux.vnet.ibm.com>, Mike Travis <travis@....com>, Andrew Morton <akpm@...ux-foundation.org> Cc: linux-kernel@...r.kernel.org, Yinghai Lu <yhlu.kernel@...il.com> Subject: [PATCH 17/42] drivers proc to use nr_irqs Signed-off-by: Yinghai Lu <yhlu.kernel@...il.com> --- fs/proc/proc_misc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index ded9698..1968251 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -503,7 +503,7 @@ static int show_stat(struct seq_file *p, void *v) struct timespec boottime; unsigned int *per_irq_sum; - per_irq_sum = kzalloc(sizeof(unsigned int)*NR_IRQS, GFP_KERNEL); + per_irq_sum = kzalloc(sizeof(unsigned int)*nr_irqs, GFP_KERNEL); if (!per_irq_sum) return -ENOMEM; @@ -525,7 +525,7 @@ static int show_stat(struct seq_file *p, void *v) softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq); steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); - for (j = 0; j < NR_IRQS; j++) { + for (j = 0; j < nr_irqs; j++) { unsigned int temp = kstat_cpu(i).irqs[j]; sum += temp; per_irq_sum[j] += temp; @@ -571,7 +571,7 @@ static int show_stat(struct seq_file *p, void *v) } seq_printf(p, "intr %llu", (unsigned long long)sum); - for (i = 0; i < NR_IRQS; i++) + for (i = 0; i < nr_irqs; i++) seq_printf(p, " %u", per_irq_sum[i]); seq_printf(p, @@ -625,13 +625,13 @@ static const struct file_operations proc_stat_operations = { */ static void *int_seq_start(struct seq_file *f, loff_t *pos) { - return (*pos <= NR_IRQS) ? pos : NULL; + return (*pos <= nr_irqs) ? pos : NULL; } static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) { (*pos)++; - if (*pos > NR_IRQS) + if (*pos > nr_irqs) return NULL; return pos; } -- 1.5.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists