aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2008-12-16 03:23:34 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-16 05:24:14 -0500
commit13bd41bc227a48d6cf8992a3286bf6eba3c71a0c (patch)
treec817813280a7fec083edc0b74989f057f17c28be /fs
parent30cb367ea2be76bf71dbd275f38d0fd3b6f4142b (diff)
proc: enclose desc variable of show_stat() in CONFIG_SPARSE_IRQ
Impact: restructure code to fix compiler warning commit 240d367b4e6c6e3c5075e034db14dba60a6f5fa7 moved desc usage point into #ifdef CONFIG_SPARSE_IRQ. Eliminate the desc variable, otherwise following warning happens: fs/proc/stat.c: In function 'show_stat': fs/proc/stat.c:31: warning: unused variable 'desc' [ akpm: cleaned up the patch to remove #ifdef ] Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/stat.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/proc/stat.c b/fs/proc/stat.c
index 3cb9492801c0..3bb1cf1e7425 100644
--- a/fs/proc/stat.c
+++ b/fs/proc/stat.c
@@ -27,7 +27,6 @@ static int show_stat(struct seq_file *p, void *v)
27 u64 sum = 0; 27 u64 sum = 0;
28 struct timespec boottime; 28 struct timespec boottime;
29 unsigned int per_irq_sum; 29 unsigned int per_irq_sum;
30 struct irq_desc *desc;
31 30
32 user = nice = system = idle = iowait = 31 user = nice = system = idle = iowait =
33 irq = softirq = steal = cputime64_zero; 32 irq = softirq = steal = cputime64_zero;
@@ -47,8 +46,7 @@ static int show_stat(struct seq_file *p, void *v)
47 guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); 46 guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest);
48 for_each_irq_nr(j) { 47 for_each_irq_nr(j) {
49#ifdef CONFIG_SPARSE_IRQ 48#ifdef CONFIG_SPARSE_IRQ
50 desc = irq_to_desc(j); 49 if (!irq_to_desc(j))
51 if (!desc)
52 continue; 50 continue;
53#endif 51#endif
54 sum += kstat_irqs_cpu(j, i); 52 sum += kstat_irqs_cpu(j, i);
@@ -98,8 +96,7 @@ static int show_stat(struct seq_file *p, void *v)
98 for_each_irq_nr(j) { 96 for_each_irq_nr(j) {
99 per_irq_sum = 0; 97 per_irq_sum = 0;
100#ifdef CONFIG_SPARSE_IRQ 98#ifdef CONFIG_SPARSE_IRQ
101 desc = irq_to_desc(j); 99 if (!irq_to_desc(j)) {
102 if (!desc) {
103 seq_printf(p, " %u", per_irq_sum); 100 seq_printf(p, " %u", per_irq_sum);
104 continue; 101 continue;
105 } 102 }