diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-19 23:49:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:52:07 -0400 |
commit | da27c118eb4f87f27ae8da2635b916daedf7264f (patch) | |
tree | 7805ebae6d7191a0daf6e9fda3547b43304e1096 /fs/proc/proc_misc.c | |
parent | a62c41337356989387d15020dc0f0288aaacfa44 (diff) |
fs/proc: use nr_irqs
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r-- | 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 b675a49c1823..a2173a2a5625 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -509,7 +509,7 @@ static int show_stat(struct seq_file *p, void *v) | |||
509 | struct timespec boottime; | 509 | struct timespec boottime; |
510 | unsigned int *per_irq_sum; | 510 | unsigned int *per_irq_sum; |
511 | 511 | ||
512 | per_irq_sum = kzalloc(sizeof(unsigned int)*NR_IRQS, GFP_KERNEL); | 512 | per_irq_sum = kzalloc(sizeof(unsigned int)*nr_irqs, GFP_KERNEL); |
513 | if (!per_irq_sum) | 513 | if (!per_irq_sum) |
514 | return -ENOMEM; | 514 | return -ENOMEM; |
515 | 515 | ||
@@ -531,7 +531,7 @@ static int show_stat(struct seq_file *p, void *v) | |||
531 | softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq); | 531 | softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq); |
532 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); | 532 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); |
533 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); | 533 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); |
534 | for (j = 0; j < NR_IRQS; j++) { | 534 | for (j = 0; j < nr_irqs; j++) { |
535 | unsigned int temp = kstat_cpu(i).irqs[j]; | 535 | unsigned int temp = kstat_cpu(i).irqs[j]; |
536 | sum += temp; | 536 | sum += temp; |
537 | per_irq_sum[j] += temp; | 537 | per_irq_sum[j] += temp; |
@@ -577,7 +577,7 @@ static int show_stat(struct seq_file *p, void *v) | |||
577 | } | 577 | } |
578 | seq_printf(p, "intr %llu", (unsigned long long)sum); | 578 | seq_printf(p, "intr %llu", (unsigned long long)sum); |
579 | 579 | ||
580 | for (i = 0; i < NR_IRQS; i++) | 580 | for (i = 0; i < nr_irqs; i++) |
581 | seq_printf(p, " %u", per_irq_sum[i]); | 581 | seq_printf(p, " %u", per_irq_sum[i]); |
582 | 582 | ||
583 | seq_printf(p, | 583 | seq_printf(p, |
@@ -631,13 +631,13 @@ static const struct file_operations proc_stat_operations = { | |||
631 | */ | 631 | */ |
632 | static void *int_seq_start(struct seq_file *f, loff_t *pos) | 632 | static void *int_seq_start(struct seq_file *f, loff_t *pos) |
633 | { | 633 | { |
634 | return (*pos <= NR_IRQS) ? pos : NULL; | 634 | return (*pos <= nr_irqs) ? pos : NULL; |
635 | } | 635 | } |
636 | 636 | ||
637 | static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) | 637 | static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) |
638 | { | 638 | { |
639 | (*pos)++; | 639 | (*pos)++; |
640 | if (*pos > NR_IRQS) | 640 | if (*pos > nr_irqs) |
641 | return NULL; | 641 | return NULL; |
642 | return pos; | 642 | return pos; |
643 | } | 643 | } |