Message ID | 20210917121130.526216-2-vladimir.oltean@nxp.com |
---|---|
State | Accepted |
Commit | 2649f69f13668b29e4e46ad3249143910048e1e5 |
Delegated to: | Tom Rini |
Headers | show |
Series | Drive-by PCI W=1 cleanups | expand |
On Fri, Sep 17, 2021 at 8:11 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote: > > The weak definition of pci_skip_dev from drivers/pci/pci_common.c is not > under CONFIG_DM_PCI_COMPAT, and that definition needs a previous > function prototype declaration to avoid W=1 build warnings. > > That prototype is not available due to it being under CONFIG_DM_PCI_COMPAT, > so move it outside of that preprocessor block. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> > --- > include/pci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
On Fri, Sep 17, 2021 at 03:11:20PM +0300, Vladimir Oltean wrote: > The weak definition of pci_skip_dev from drivers/pci/pci_common.c is not > under CONFIG_DM_PCI_COMPAT, and that definition needs a previous > function prototype declaration to avoid W=1 build warnings. > > That prototype is not available due to it being under CONFIG_DM_PCI_COMPAT, > so move it outside of that preprocessor block. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Applied to u-boot/next, thanks!
diff --git a/include/pci.h b/include/pci.h index 0fc22adffd00..11009a2f787a 100644 --- a/include/pci.h +++ b/include/pci.h @@ -724,6 +724,7 @@ void pciauto_config_init(struct pci_controller *hose); */ int pciauto_region_allocate(struct pci_region *res, pci_size_t size, pci_addr_t *bar, bool supports_64bit); +int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev); #if defined(CONFIG_DM_PCI_COMPAT) extern int pci_hose_read_config_byte_via_dword(struct pci_controller *hose, @@ -741,7 +742,6 @@ extern struct pci_controller* pci_bus_to_hose(int bus); extern struct pci_controller *find_hose_by_cfg_addr(void *cfg_addr); extern struct pci_controller *pci_get_hose_head(void); -extern int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev); extern int pci_hose_scan(struct pci_controller *hose); extern int pci_hose_scan_bus(struct pci_controller *hose, int bus);
The weak definition of pci_skip_dev from drivers/pci/pci_common.c is not under CONFIG_DM_PCI_COMPAT, and that definition needs a previous function prototype declaration to avoid W=1 build warnings. That prototype is not available due to it being under CONFIG_DM_PCI_COMPAT, so move it outside of that preprocessor block. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> --- include/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)