[parisc-linux] Fix for uninitialised variable in new seq_file code
for arch/parisc/ikernel/rq.c
James Bottomley
James.Bottomley at steeleye.com
Tue Dec 30 13:14:59 MST 2003
The compiler justly complains in this:
unsigned int regnr = *(loff_t *) v, i;
if (regnr == 0) {
seq_puts(p, " ");
#ifdef CONFIG_SMP
for (i = 0; i < NR_CPUS; i++)
#endif
seq_printf(p, " CPU%02d ", i);
That i is uninitialised if CONFIG_SMP is not set.
James
===== irq.c 1.20 vs edited =====
--- 1.20/arch/parisc/kernel/irq.c Mon Dec 29 15:37:39 2003
+++ edited/irq.c Tue Dec 30 14:12:43 2003
@@ -215,7 +215,7 @@
int show_interrupts(struct seq_file *p, void *v)
{
#ifdef CONFIG_PROC_FS
- unsigned int regnr = *(loff_t *) v, i;
+ unsigned int regnr = *(loff_t *) v, i = 0;
if (regnr == 0) {
seq_puts(p, " ");
More information about the parisc-linux
mailing list