[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081216172455.DBBB.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date: Tue, 16 Dec 2008 17:25:50 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: kosaki.motohiro@...fujitsu.com, Yinghai Lu <yinghai@...nel.org>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [mmotm][PATCH] proc: enclose desc variable of show_stat() in CONFIG_SPARSE_IRQ
> This would be better, no?
Agreed. sorry sending silly patch.
> --- a/fs/proc/stat.c~proc-enclose-desc-variable-of-show_stat-in-config_sparse_irq
> +++ a/fs/proc/stat.c
> @@ -28,7 +28,6 @@ static int show_stat(struct seq_file *p,
> u64 sum_softirq = 0;
> struct timespec boottime;
> unsigned int per_irq_sum;
> - struct irq_desc *desc;
>
> user = nice = system = idle = iowait =
> irq = softirq = steal = cputime64_zero;
> @@ -48,8 +47,7 @@ static int show_stat(struct seq_file *p,
> guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest);
> for_each_irq_nr(j) {
> #ifdef CONFIG_SPARSE_IRQ
> - desc = irq_to_desc(j);
> - if (!desc)
> + if (!irq_to_desc(j))
> continue;
> #endif
> sum += kstat_irqs_cpu(j, i);
> @@ -103,8 +101,7 @@ static int show_stat(struct seq_file *p,
> for_each_irq_nr(j) {
> per_irq_sum = 0;
> #ifdef CONFIG_SPARSE_IRQ
> - desc = irq_to_desc(j);
> - if (!desc) {
> + if (!irq_to_desc(j)) {
> seq_printf(p, " %u", per_irq_sum);
> continue;
> }
> _
>
--
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