From: Anton Blanchard The removal of -Wno-uninitialized on ppc64 revealed a number of real bugs. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/iSeries_pci_reset.c | 3 ++- 25-akpm/drivers/char/hvcs.c | 6 +++--- 25-akpm/drivers/net/ibmveth.c | 7 +++++-- 25-akpm/drivers/pci/hotplug/rpaphp_core.c | 2 +- 25-akpm/drivers/pci/hotplug/rpaphp_pci.c | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff -puN arch/ppc64/kernel/iSeries_pci_reset.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal arch/ppc64/kernel/iSeries_pci_reset.c --- 25/arch/ppc64/kernel/iSeries_pci_reset.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal 2004-09-11 16:30:15.442084784 -0700 +++ 25-akpm/arch/ppc64/kernel/iSeries_pci_reset.c 2004-09-11 16:30:15.455082808 -0700 @@ -65,7 +65,8 @@ int iSeries_Device_ToggleReset(struct pc AssertDelay = (5 * HZ) / 10; else AssertDelay = (AssertTime * HZ) / 10; - if (WaitDelay == 0) + + if (DelayTime == 0) WaitDelay = (30 * HZ) / 10; else WaitDelay = (DelayTime * HZ) / 10; diff -puN drivers/char/hvcs.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal drivers/char/hvcs.c --- 25/drivers/char/hvcs.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal 2004-09-11 16:30:15.443084632 -0700 +++ 25-akpm/drivers/char/hvcs.c 2004-09-11 16:30:15.452083264 -0700 @@ -427,7 +427,7 @@ static int hvcs_io(struct hvcs_struct *h struct tty_struct *tty; char buf[HVCS_BUFF_LEN] __ALIGNED__; unsigned long flags; - int got; + int got = 0; int i; spin_lock_irqsave(&hvcsd->lock, flags); @@ -945,7 +945,7 @@ static int hvcs_enable_device(struct hvc */ struct hvcs_struct *hvcs_get_by_index(int index) { - struct hvcs_struct *hvcsd; + struct hvcs_struct *hvcsd = NULL; unsigned long flags; spin_lock(&hvcs_structs_lock); @@ -1433,7 +1433,7 @@ static int __init hvcs_module_init(void) " as a tty driver failed.\n"); hvcs_free_index_list(); put_tty_driver(hvcs_tty_driver); - return rc; + return -EIO; } hvcs_pi_buff = kmalloc(PAGE_SIZE, GFP_KERNEL); diff -puN drivers/net/ibmveth.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal drivers/net/ibmveth.c --- 25/drivers/net/ibmveth.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal 2004-09-11 16:30:15.445084328 -0700 +++ 25-akpm/drivers/net/ibmveth.c 2004-09-11 16:30:15.453083112 -0700 @@ -885,13 +885,16 @@ static int __devinit ibmveth_probe(struc mac_addr_p = (unsigned char *) vio_get_attribute(dev, VETH_MAC_ADDR, 0); if(!mac_addr_p) { - ibmveth_error_printk("Can't find VETH_MAC_ADDR attribute\n"); + printk(KERN_ERR "(%s:%3.3d) ERROR: Can't find VETH_MAC_ADDR " + "attribute\n", __FILE__, __LINE__); return 0; } mcastFilterSize_p= (unsigned int *) vio_get_attribute(dev, VETH_MCAST_FILTER_SIZE, 0); if(!mcastFilterSize_p) { - ibmveth_error_printk("Can't find VETH_MCAST_FILTER_SIZE attribute\n"); + printk(KERN_ERR "(%s:%3.3d) ERROR: Can't find " + "VETH_MCAST_FILTER_SIZE attribute\n", + __FILE__, __LINE__); return 0; } diff -puN drivers/pci/hotplug/rpaphp_core.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal drivers/pci/hotplug/rpaphp_core.c --- 25/drivers/pci/hotplug/rpaphp_core.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal 2004-09-11 16:30:15.446084176 -0700 +++ 25-akpm/drivers/pci/hotplug/rpaphp_core.c 2004-09-11 16:30:15.454082960 -0700 @@ -455,7 +455,7 @@ static int rpaphp_disable_slot(struct pc static int disable_slot(struct hotplug_slot *hotplug_slot) { - int retval; + int retval = -EINVAL; struct slot *slot = (struct slot *)hotplug_slot->private; dbg("%s - Entry: slot[%s]\n", __FUNCTION__, slot->name); diff -puN drivers/pci/hotplug/rpaphp_pci.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal drivers/pci/hotplug/rpaphp_pci.c --- 25/drivers/pci/hotplug/rpaphp_pci.c~ppc64-fix-real-bugs-uncovered-by-wno-uninitialized-removal 2004-09-11 16:30:15.448083872 -0700 +++ 25-akpm/drivers/pci/hotplug/rpaphp_pci.c 2004-09-11 16:30:15.455082808 -0700 @@ -186,7 +186,7 @@ static struct pci_dev * rpaphp_pci_config_slot(struct device_node *dn, struct pci_bus *bus) { struct device_node *eads_first_child = dn->child; - struct pci_dev *dev; + struct pci_dev *dev = NULL; int num; dbg("Enter %s: dn=%s bus=%s\n", __FUNCTION__, dn->full_name, bus->name); _