aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-12 02:57:40 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-12 02:57:40 -0400
commit77d10d0e63dcc4f961cb416447d64281300e5a01 (patch)
tree5dc062f62bf8fbe394ac1930030c407c4d2f018a /arch/sparc64
parent21cd8833933ef20a0bbb368ea00876cbfc06141b (diff)
sparc64: Fix sparse warnings in pci.c
1) Declare pci_poke_* in pci_impl.h 2) of_create_pci_dev() should be static 3) ->setup_msi_irq() wants an unsigned int pointer not a plain int one 4) void value expression return in arch_teardown_msi_irq() Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/pci.c14
-rw-r--r--arch/sparc64/kernel/pci_impl.h4
-rw-r--r--arch/sparc64/kernel/traps.c5
3 files changed, 11 insertions, 12 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index c6e81dea2cf3..e12a0586b43c 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -242,9 +242,9 @@ static void pci_parse_of_addrs(struct of_device *op,
242 } 242 }
243} 243}
244 244
245struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, 245static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
246 struct device_node *node, 246 struct device_node *node,
247 struct pci_bus *bus, int devfn) 247 struct pci_bus *bus, int devfn)
248{ 248{
249 struct dev_archdata *sd; 249 struct dev_archdata *sd;
250 struct of_device *op; 250 struct of_device *op;
@@ -998,7 +998,7 @@ EXPORT_SYMBOL(pci_domain_nr);
998int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) 998int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
999{ 999{
1000 struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; 1000 struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
1001 int virt_irq; 1001 unsigned int virt_irq;
1002 1002
1003 if (!pbm->setup_msi_irq) 1003 if (!pbm->setup_msi_irq)
1004 return -EINVAL; 1004 return -EINVAL;
@@ -1012,10 +1012,8 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
1012 struct pci_dev *pdev = entry->dev; 1012 struct pci_dev *pdev = entry->dev;
1013 struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; 1013 struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
1014 1014
1015 if (!pbm->teardown_msi_irq) 1015 if (pbm->teardown_msi_irq)
1016 return; 1016 pbm->teardown_msi_irq(virt_irq, pdev);
1017
1018 return pbm->teardown_msi_irq(virt_irq, pdev);
1019} 1017}
1020#endif /* !(CONFIG_PCI_MSI) */ 1018#endif /* !(CONFIG_PCI_MSI) */
1021 1019
diff --git a/arch/sparc64/kernel/pci_impl.h b/arch/sparc64/kernel/pci_impl.h
index b300f39e9e8d..03186824327e 100644
--- a/arch/sparc64/kernel/pci_impl.h
+++ b/arch/sparc64/kernel/pci_impl.h
@@ -178,4 +178,8 @@ extern void pci_config_write32(u32 *addr, u32 val);
178extern struct pci_ops sun4u_pci_ops; 178extern struct pci_ops sun4u_pci_ops;
179extern struct pci_ops sun4v_pci_ops; 179extern struct pci_ops sun4v_pci_ops;
180 180
181extern volatile int pci_poke_in_progress;
182extern volatile int pci_poke_cpu;
183extern volatile int pci_poke_faulted;
184
181#endif /* !(PCI_IMPL_H) */ 185#endif /* !(PCI_IMPL_H) */
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 9378896589f0..342da2164239 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -341,10 +341,7 @@ void sun4v_data_access_exception_tl1(struct pt_regs *regs, unsigned long addr, u
341} 341}
342 342
343#ifdef CONFIG_PCI 343#ifdef CONFIG_PCI
344/* This is really pathetic... */ 344#include "pci_impl.h"
345extern volatile int pci_poke_in_progress;
346extern volatile int pci_poke_cpu;
347extern volatile int pci_poke_faulted;
348#endif 345#endif
349 346
350/* When access exceptions happen, we must do this. */ 347/* When access exceptions happen, we must do this. */