From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kosaki.motohiro@jp.fujitsu.com, Yinghai Lu <yinghai@kernel.org>,
Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [mmotm][PATCH] proc: enclose desc variable of show_stat() in CONFIG_SPARSE_IRQ
Date: Tue, 16 Dec 2008 17:25:50 +0900 (JST) [thread overview]
Message-ID: <20081216172455.DBBB.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <20081216002247.100bc362.akpm@linux-foundation.org>
> 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;
> }
> _
>
next prev parent reply other threads:[~2008-12-16 8:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 8:00 KOSAKI Motohiro
2008-12-16 8:22 ` Andrew Morton
2008-12-16 8:25 ` KOSAKI Motohiro [this message]
2008-12-16 10:25 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081216172455.DBBB.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®