PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
Subsystems (4)
PATCH 1/1 PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
From: Michael Kelley <[email protected]>
Field pci_bus in struct hv_pcibus_device is unused since commit 418cb6c8e051 ("PCI: hv: Generify PCI probing"). Remove it.
No functional change.
--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)
drivers/pci/controller/pci-hyperv.c +0 -1
@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr;
Signature · 1 line
2.25.1
Hi Michael,
Quoted 5 lines · On Sun, Jan 11, 2026 at 09:00:34AM -0800, [email protected] wrote:
From: Michael Kelley <[email protected]>
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.
Since that commit is several years old (2021), I was curious if this was found by manual inspection or if the compiler was able to flag the unused variable as well.
Quoted 3 lines
No functional change.
Signed-off-by Michael Kelley <[email protected]>
Regards,
Srivatsa
Microsoft Linux Systems Group
Quoted 20 lines
--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)drivers/pci/controller/pci-hyperv.c +0
-1@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr;Signature · 1 line
2.25.1
From: Srivatsa S. Bhat <[email protected]> Sent: Monday, January 12, 2026 6:29 AM
Quoted 5 lines
Hi Michael,
Quoted 2 lines · On Sun, Jan 11, 2026 at 09:00:34AM -0800, [email protected] wrote:
From: Michael Kelley <[email protected]>
Quoted 7 lines
Quoted 3 lines
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.Since that commit is several years old (2021), I was curious if this was found by manual inspection or if the compiler was able to flag the unused variable as well.
Code inspection. I was brushing up on how the structs defined in pci-hyperv.c relate to the standard Linux PCI struct pci_bus and struct pci_dev. Having a pointer to struct pci_bus in struct hv_pcibus_device makes sense, and I was a bit surprised to find it's not set or used. Instead, the PCI bus is always found through the PCI bridge.
Michael
Quoted 31 lines
Quoted 4 lines
No functional change.
Signed-off-by Michael Kelley <[email protected]>Reviewed-by Srivatsa S. Bhat (Microsoft) <[email protected]>Regards,
Srivatsa
Microsoft Linux Systems GroupQuoted 20 lines
--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)drivers/pci/controller/pci-hyperv.c +0
-2@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr; --2.25.1
Quoted 14 lines · Michael Kelley
From: Srivatsa S. Bhat <[email protected]> Sent: Monday, January 12, 2026 6:29 AM
Quoted 5 lines
Hi Michael,
Quoted 2 lines · On Sun, Jan 11, 2026 at 09:00:34AM -0800, [email protected] wrote:
From: Michael Kelley <[email protected]>
Quoted 7 lines
Quoted 3 lines
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.Since that commit is several years old (2021), I was curious if this was found by manual inspection or if the compiler was able to flag the unused variable as well.
Quoted 7 lines
Code inspection. I was brushing up on how the structs defined in
pci-hyperv.crelate to the standard Linux PCI structpci_busand structpci_dev. Having a pointer to structpci_busin structhv_pcibus_devicemakes sense, and I was a bit surprised to find it's not set or used. Instead, the PCI bus is always found through the PCI bridge.
Ah, I see, thank you for the background!
Regards,
Srivatsa
Quoted 32 lines
Quoted 32 lines
Quoted 5 lines
No functional change.
Signed-off-by Michael Kelley <[email protected]>Reviewed-by Srivatsa S. Bhat (Microsoft) <[email protected]>Regards,
Srivatsa
Microsoft Linux Systems GroupQuoted 20 lines
--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)drivers/pci/controller/pci-hyperv.c +0
-2@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr; --2.25.1
Quoted 5 lines · On 1/11/2026 9:00 AM, [email protected] wrote:
From: Michael Kelley <[email protected]>
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.
Quoted 7 lines
No functional change.
Signed-off-by Michael Kelley <[email protected]>--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)
From: [email protected] <[email protected]> Sent: Sunday, January 11, 2026 9:01 AM
Quoted 9 lines
From: Michael Kelley <[email protected]>
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.No functional change.
Signed-off-by Michael Kelley <[email protected]>
Could a PCI maintainer give an Ack for this trivial patch?
Thx, Michael
Quoted 19 lines
--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)drivers/pci/controller/pci-hyperv.c +0
-2@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr; --2.25.1
Quoted 4 lines · Michael Kelley
From: [email protected] <[email protected]> Sent: Sunday, January 11, 2026 9:01 AM
Quoted 3 lines
From: Michael Kelley <[email protected]>
Quoted 9 lines
Quoted 6 lines
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.No functional change.
Signed-off-by Michael Kelley <[email protected]>Could a PCI maintainer give an Ack for this trivial patch?
I see this got queued by Wei Liu, but FWIW:
- Mani
Quoted 22 lines
Thx, Michael
Quoted 19 lines
--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)drivers/pci/controller/pci-hyperv.c +0
-2@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr; --2.25.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 17 lines · On 11-01-2026 22:30, [email protected] wrote:
From: Michael Kelley <[email protected]>
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.No functional change.
Signed-off-by Michael Kelley <[email protected]>--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)drivers/pci/controller/pci-hyperv.c +0
-0
drivers/pci/controller/pci-hyperv.c struct hv_pcibus_device { · line 506
Quoted 7 lines
drivers/pci/controller/pci-hyperv.c +0
-1@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr;
Regards,
Prasanna Kumar
Wei Liu
maintainerQuoted 8 lines · On Sun, Jan 11, 2026 at 09:00:34AM -0800, [email protected] wrote:
From: Michael Kelley <[email protected]>
Field
pci_busin structhv_pcibus_deviceis unused since commit418cb6c8e051("PCI: hv: Generify PCI probing"). Remove it.No functional change.
Signed-off-by Michael Kelley <[email protected]>
It looks like this trivial patch is not yet picked up. I've queued it up.
Thanks,
Wei
Quoted 19 lines
--- drivers/pci/controller/pci-hyperv.c | 1 - 1 file changed, 1 deletion(-)drivers/pci/controller/pci-hyperv.c +0
-1@@ -501,7 +501,6 @@ struct hv_pcibus_device {struct resource *low_mmio_res;struct resource *high_mmio_res;struct completion *survey_event; -struct pci_bus *pci_bus;spinlock_t config_lock;/* Avoid two threads writing index page */ spinlock_t device_list_lock;/* Protect lists below */ void __iomem *cfg_addr;Signature · 1 line
2.25.1