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>
This commit is contained in:
parent
21cd883393
commit
77d10d0e63
3 changed files with 11 additions and 12 deletions
|
@ -242,9 +242,9 @@ static void pci_parse_of_addrs(struct of_device *op,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
|
static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
|
||||||
struct device_node *node,
|
struct device_node *node,
|
||||||
struct pci_bus *bus, int devfn)
|
struct pci_bus *bus, int devfn)
|
||||||
{
|
{
|
||||||
struct dev_archdata *sd;
|
struct dev_archdata *sd;
|
||||||
struct of_device *op;
|
struct of_device *op;
|
||||||
|
@ -998,7 +998,7 @@ EXPORT_SYMBOL(pci_domain_nr);
|
||||||
int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
|
int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
|
||||||
{
|
{
|
||||||
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
|
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
|
||||||
int virt_irq;
|
unsigned int virt_irq;
|
||||||
|
|
||||||
if (!pbm->setup_msi_irq)
|
if (!pbm->setup_msi_irq)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1012,10 +1012,8 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
|
||||||
struct pci_dev *pdev = entry->dev;
|
struct pci_dev *pdev = entry->dev;
|
||||||
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
|
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
|
||||||
|
|
||||||
if (!pbm->teardown_msi_irq)
|
if (pbm->teardown_msi_irq)
|
||||||
return;
|
pbm->teardown_msi_irq(virt_irq, pdev);
|
||||||
|
|
||||||
return pbm->teardown_msi_irq(virt_irq, pdev);
|
|
||||||
}
|
}
|
||||||
#endif /* !(CONFIG_PCI_MSI) */
|
#endif /* !(CONFIG_PCI_MSI) */
|
||||||
|
|
||||||
|
|
|
@ -178,4 +178,8 @@ extern void pci_config_write32(u32 *addr, u32 val);
|
||||||
extern struct pci_ops sun4u_pci_ops;
|
extern struct pci_ops sun4u_pci_ops;
|
||||||
extern struct pci_ops sun4v_pci_ops;
|
extern struct pci_ops sun4v_pci_ops;
|
||||||
|
|
||||||
|
extern volatile int pci_poke_in_progress;
|
||||||
|
extern volatile int pci_poke_cpu;
|
||||||
|
extern volatile int pci_poke_faulted;
|
||||||
|
|
||||||
#endif /* !(PCI_IMPL_H) */
|
#endif /* !(PCI_IMPL_H) */
|
||||||
|
|
|
@ -341,10 +341,7 @@ void sun4v_data_access_exception_tl1(struct pt_regs *regs, unsigned long addr, u
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
/* This is really pathetic... */
|
#include "pci_impl.h"
|
||||||
extern volatile int pci_poke_in_progress;
|
|
||||||
extern volatile int pci_poke_cpu;
|
|
||||||
extern volatile int pci_poke_faulted;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* When access exceptions happen, we must do this. */
|
/* When access exceptions happen, we must do this. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue