Message ID | 1413445963-24706-3-git-send-email-richard.zhu@freescale.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
Am Donnerstag, den 16.10.2014, 15:52 +0800 schrieb Richard Zhu: > host init maybe failed, change the func type of host_init > defined in struct pci_host_ops from void to int. > > Signed-off-by: Richard Zhu <richard.zhu@freescale.com> NAK. You are breaking compilation within the series here. If you are going to change the prototype the dependant changes need to be in the same patch. So squash in at least patch 3-5 plus the imx6 change. > --- > drivers/pci/host/pcie-designware.c | 7 +++++-- > drivers/pci/host/pcie-designware.h | 2 +- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c > index b1f82ff..1a2b477 100644 > --- a/drivers/pci/host/pcie-designware.c > +++ b/drivers/pci/host/pcie-designware.c > @@ -578,8 +578,11 @@ int __init dw_pcie_host_init(struct pcie_port *pp) > } > } > > - if (pp->ops->host_init) > - pp->ops->host_init(pp); > + if (pp->ops->host_init) { > + ret = pp->ops->host_init(pp); > + if (ret < 0) > + return ret; > + } > > dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0); > > diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h > index b0bfed0..57ab11d 100644 > --- a/drivers/pci/host/pcie-designware.h > +++ b/drivers/pci/host/pcie-designware.h > @@ -72,7 +72,7 @@ struct pcie_host_ops { > int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus, > unsigned int devfn, int where, int size, u32 val); > int (*link_up)(struct pcie_port *pp); > - void (*host_init)(struct pcie_port *pp); > + int (*host_init)(struct pcie_port *pp); > void (*msi_set_irq)(struct pcie_port *pp, int irq); > void (*msi_clear_irq)(struct pcie_port *pp, int irq); > u32 (*get_msi_data)(struct pcie_port *pp); -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
DQo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cCk7DQo+IA0KDQoNCkJlc3QgUmVn YXJkcw0KUmljaGFyZCBaaHUNCg0K -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index b1f82ff..1a2b477 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -578,8 +578,11 @@ int __init dw_pcie_host_init(struct pcie_port *pp) } } - if (pp->ops->host_init) - pp->ops->host_init(pp); + if (pp->ops->host_init) { + ret = pp->ops->host_init(pp); + if (ret < 0) + return ret; + } dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0); diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h index b0bfed0..57ab11d 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h @@ -72,7 +72,7 @@ struct pcie_host_ops { int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); int (*link_up)(struct pcie_port *pp); - void (*host_init)(struct pcie_port *pp); + int (*host_init)(struct pcie_port *pp); void (*msi_set_irq)(struct pcie_port *pp, int irq); void (*msi_clear_irq)(struct pcie_port *pp, int irq); u32 (*get_msi_data)(struct pcie_port *pp);
host init maybe failed, change the func type of host_init defined in struct pci_host_ops from void to int. Signed-off-by: Richard Zhu <richard.zhu@freescale.com> --- drivers/pci/host/pcie-designware.c | 7 +++++-- drivers/pci/host/pcie-designware.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-)