Commit 974b808d authored by Vincent Whitchurch's avatar Vincent Whitchurch Committed by Richard Weinberger

um: virt-pci: fix missing declaration warning

Fix this warning which appears with W=1 and without CONFIG_OF:

 warning: no previous declaration for 'pcibios_get_phb_of_node'
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308230949.PphIIlhq-lkp@intel.com/
Fixes: 314a1408 ("um: virt-pci: implement pcibios_get_phb_of_node()")
Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 32280e83
...@@ -544,6 +544,7 @@ static void um_pci_irq_vq_cb(struct virtqueue *vq) ...@@ -544,6 +544,7 @@ static void um_pci_irq_vq_cb(struct virtqueue *vq)
} }
} }
#ifdef CONFIG_OF
/* Copied from arch/x86/kernel/devicetree.c */ /* Copied from arch/x86/kernel/devicetree.c */
struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
{ {
...@@ -562,6 +563,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) ...@@ -562,6 +563,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
} }
return NULL; return NULL;
} }
#endif
static int um_pci_init_vqs(struct um_pci_device *dev) static int um_pci_init_vqs(struct um_pci_device *dev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment