Re: [PATCH] PCI: pci-hyperv: fix build errors on non-SYSFS config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 12, 2019 at 04:04:17PM +0000, Haiyang Zhang wrote:


-----Original Message-----
From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Sent: Friday, July 12, 2019 11:53 AM
To: linux-pci <linux-pci@xxxxxxxxxxxxxxx>; LKML <linux-
kernel@xxxxxxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>; Jake Oshins
<jakeo@xxxxxxxxxxxxx>; KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang
Zhang <haiyangz@xxxxxxxxxxxxx>; Stephen Hemminger
<sthemmin@xxxxxxxxxxxxx>; Stephen Hemminger
<stephen@xxxxxxxxxxxxxxxxxx>; Sasha Levin <sashal@xxxxxxxxxx>; Bjorn
Helgaas <bhelgaas@xxxxxxxxxx>; Dexuan Cui <decui@xxxxxxxxxxxxx>
Subject: [PATCH] PCI: pci-hyperv: fix build errors on non-SYSFS config

From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Fix build errors when building almost-allmodconfig but with SYSFS
not set (not enabled).  Fixes these build errors:

ERROR: "pci_destroy_slot" [drivers/pci/controller/pci-hyperv.ko] undefined!
ERROR: "pci_create_slot" [drivers/pci/controller/pci-hyperv.ko] undefined!

drivers/pci/slot.o is only built when SYSFS is enabled, so
pci-hyperv.o has an implicit dependency on SYSFS.
Make that explicit.

Also, depending on X86 && X86_64 is not needed, so just change that
to depend on X86_64.

Fixes: a15f2c08c708 ("PCI: hv: support reporting serial number as slot
information")

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Jake Oshins <jakeo@xxxxxxxxxxxxx>
Cc: "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>
Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Cc: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>
Cc: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
Cc: Sasha Levin <sashal@xxxxxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Cc: linux-pci@xxxxxxxxxxxxxxx
Cc: linux-hyperv@xxxxxxxxxxxxxxx
Cc: Dexuan Cui <decui@xxxxxxxxxxxxx>
---
v3: corrected Fixes: tag [Dexuan Cui <decui@xxxxxxxxxxxxx>]
    This is the Microsoft-preferred version of the patch.

 drivers/pci/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- lnx-52.orig/drivers/pci/Kconfig
+++ lnx-52/drivers/pci/Kconfig
@@ -181,7 +181,7 @@ config PCI_LABEL

 config PCI_HYPERV
         tristate "Hyper-V PCI Frontend"
-        depends on X86 && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN
&& X86_64
+        depends on X86_64 && HYPERV && PCI_MSI &&
PCI_MSI_IRQ_DOMAIN && SYSFS
         help
           The PCI device frontend driver allows the kernel to import arbitrary
           PCI devices from a PCI backend to support PCI driver domains.


Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>

Queued up for hyperv-fixes, thank you!

--
Thanks,
Sasha



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux