diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-27 10:40:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-17 04:19:15 +0300 |
commit | c6fee0810df4e0f4cf9c4834d2569ca01c02cffc (patch) | |
tree | 7b6adabf750ca0279895f8b9aa8a42eb9837e4e2 /arch/sparc/kernel/pci_common.c | |
parent | 0399bb5b918bd8ffbf065a3db142ff121aaa18e0 (diff) | |
download | linux-c6fee0810df4e0f4cf9c4834d2569ca01c02cffc.tar.xz |
sparc64: Fix build errors with gcc-4.6.0
Most of the warnings emitted (we fail arch/sparc file
builds with -Werror) were legitimate but harmless, however
one case (n2_pcr_write) was a genuine bug.
Based almost entirely upon a patch by Sam Ravnborg.
Reported-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/pci_common.c')
-rw-r--r-- | arch/sparc/kernel/pci_common.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c index 6c7a33af3ba6..6e3874b64488 100644 --- a/arch/sparc/kernel/pci_common.c +++ b/arch/sparc/kernel/pci_common.c @@ -295,14 +295,17 @@ static int sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, unsigned int bus = bus_dev->number; unsigned int device = PCI_SLOT(devfn); unsigned int func = PCI_FUNC(devfn); - unsigned long ret; if (config_out_of_range(pbm, bus, devfn, where)) { /* Do nothing. */ } else { - ret = pci_sun4v_config_put(devhandle, - HV_PCI_DEVICE_BUILD(bus, device, func), - where, size, value); + /* We don't check for hypervisor errors here, but perhaps + * we should and influence our return value depending upon + * what kind of error is thrown. + */ + pci_sun4v_config_put(devhandle, + HV_PCI_DEVICE_BUILD(bus, device, func), + where, size, value); } return PCIBIOS_SUCCESSFUL; } |