* [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
@ 2026-01-11 17:00 mhkelley58
2026-01-12 14:29 ` Srivatsa S. Bhat
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: mhkelley58 @ 2026-01-11 17:00 UTC (permalink / raw)
To: kys, haiyangz, wei.liu, decui, longli, lpieralisi, kwilczynski,
mani, robh, bhelgaas
Cc: linux-pci, linux-kernel, linux-hyperv
From: Michael Kelley <mhklinux@outlook.com>
Field pci_bus in struct hv_pcibus_device is unused since
commit 418cb6c8e051 ("PCI: hv: Generify PCI probing"). Remove it.
No functional change.
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
---
drivers/pci/controller/pci-hyperv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index 1e237d3538f9..7fcba05cec30 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-11 17:00 [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device mhkelley58
@ 2026-01-12 14:29 ` Srivatsa S. Bhat
2026-01-12 15:54 ` Michael Kelley
2026-01-12 17:01 ` Easwar Hariharan
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Srivatsa S. Bhat @ 2026-01-12 14:29 UTC (permalink / raw)
To: mhklinux
Cc: kys, haiyangz, wei.liu, decui, longli, lpieralisi, kwilczynski,
mani, robh, bhelgaas, linux-pci, linux-kernel, linux-hyperv
Hi Michael,
On Sun, Jan 11, 2026 at 09:00:34AM -0800, mhkelley58@gmail.com wrote:
> From: Michael Kelley <mhklinux@outlook.com>
>
> Field pci_bus in struct hv_pcibus_device is unused since
> commit 418cb6c8e051 ("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.
> No functional change.
>
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Srivatsa S. Bhat (Microsoft) <srivatsa@csail.mit.edu>
Regards,
Srivatsa
Microsoft Linux Systems Group
> ---
> drivers/pci/controller/pci-hyperv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 1e237d3538f9..7fcba05cec30 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -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
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-12 14:29 ` Srivatsa S. Bhat
@ 2026-01-12 15:54 ` Michael Kelley
2026-01-12 16:55 ` Srivatsa S. Bhat
0 siblings, 1 reply; 9+ messages in thread
From: Michael Kelley @ 2026-01-12 15:54 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, longli@microsoft.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org,
bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org
From: Srivatsa S. Bhat <srivatsa@csail.mit.edu> Sent: Monday, January 12, 2026 6:29 AM
> Hi Michael,
>
> On Sun, Jan 11, 2026 at 09:00:34AM -0800, mhkelley58@gmail.com wrote:
> > From: Michael Kelley <mhklinux@outlook.com>
> >
> > Field pci_bus in struct hv_pcibus_device is unused since
> > commit 418cb6c8e051 ("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
>
> > No functional change.
> >
> > Signed-off-by: Michael Kelley <mhklinux@outlook.com>
>
> Reviewed-by: Srivatsa S. Bhat (Microsoft) <srivatsa@csail.mit.edu>
>
> Regards,
> Srivatsa
> Microsoft Linux Systems Group
>
> > ---
> > drivers/pci/controller/pci-hyperv.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> > index 1e237d3538f9..7fcba05cec30 100644
> > --- a/drivers/pci/controller/pci-hyperv.c
> > +++ b/drivers/pci/controller/pci-hyperv.c
> > @@ -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
> >
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-12 15:54 ` Michael Kelley
@ 2026-01-12 16:55 ` Srivatsa S. Bhat
0 siblings, 0 replies; 9+ messages in thread
From: Srivatsa S. Bhat @ 2026-01-12 16:55 UTC (permalink / raw)
To: Michael Kelley
Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, longli@microsoft.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org,
bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org
On Mon, Jan 12, 2026 at 03:54:51PM +0000, Michael Kelley wrote:
> From: Srivatsa S. Bhat <srivatsa@csail.mit.edu> Sent: Monday, January 12, 2026 6:29 AM
> > Hi Michael,
> >
> > On Sun, Jan 11, 2026 at 09:00:34AM -0800, mhkelley58@gmail.com wrote:
> > > From: Michael Kelley <mhklinux@outlook.com>
> > >
> > > Field pci_bus in struct hv_pcibus_device is unused since
> > > commit 418cb6c8e051 ("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.
>
Ah, I see, thank you for the background!
Regards,
Srivatsa
>
> >
> > > No functional change.
> > >
> > > Signed-off-by: Michael Kelley <mhklinux@outlook.com>
> >
> > Reviewed-by: Srivatsa S. Bhat (Microsoft) <srivatsa@csail.mit.edu>
> >
> > Regards,
> > Srivatsa
> > Microsoft Linux Systems Group
> >
> > > ---
> > > drivers/pci/controller/pci-hyperv.c | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> > > index 1e237d3538f9..7fcba05cec30 100644
> > > --- a/drivers/pci/controller/pci-hyperv.c
> > > +++ b/drivers/pci/controller/pci-hyperv.c
> > > @@ -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
> > >
> > >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-11 17:00 [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device mhkelley58
2026-01-12 14:29 ` Srivatsa S. Bhat
@ 2026-01-12 17:01 ` Easwar Hariharan
2026-01-29 4:35 ` Michael Kelley
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Easwar Hariharan @ 2026-01-12 17:01 UTC (permalink / raw)
To: mhklinux
Cc: kys, haiyangz, wei.liu, decui, longli, lpieralisi, kwilczynski,
mani, robh, bhelgaas, easwar.hariharan, linux-pci, linux-kernel,
linux-hyperv
On 1/11/2026 9:00 AM, mhkelley58@gmail.com wrote:
> From: Michael Kelley <mhklinux@outlook.com>
>
> Field pci_bus in struct hv_pcibus_device is unused since
> commit 418cb6c8e051 ("PCI: hv: Generify PCI probing"). Remove it.
>
> No functional change.
>
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
> ---
> drivers/pci/controller/pci-hyperv.c | 1 -
> 1 file changed, 1 deletion(-)
>
Reviewed-by: Easwar Hariharan <easwar.hariharan@linux.microsoft.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-11 17:00 [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device mhkelley58
2026-01-12 14:29 ` Srivatsa S. Bhat
2026-01-12 17:01 ` Easwar Hariharan
@ 2026-01-29 4:35 ` Michael Kelley
2026-02-04 12:37 ` mani
2026-01-29 9:48 ` Prasanna Kumar T S M
2026-02-04 6:02 ` Wei Liu
4 siblings, 1 reply; 9+ messages in thread
From: Michael Kelley @ 2026-01-29 4:35 UTC (permalink / raw)
To: lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org,
robh@kernel.org, bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hyperv@vger.kernel.org, Michael Kelley, kys@microsoft.com,
haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
longli@microsoft.com
From: mhkelley58@gmail.com <mhkelley58@gmail.com> Sent: Sunday, January 11, 2026 9:01 AM
>
> From: Michael Kelley <mhklinux@outlook.com>
>
> Field pci_bus in struct hv_pcibus_device is unused since
> commit 418cb6c8e051 ("PCI: hv: Generify PCI probing"). Remove it.
>
> No functional change.
>
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Could a PCI maintainer give an Ack for this trivial patch?
Thx, Michael
> ---
> drivers/pci/controller/pci-hyperv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 1e237d3538f9..7fcba05cec30 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -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
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-11 17:00 [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device mhkelley58
` (2 preceding siblings ...)
2026-01-29 4:35 ` Michael Kelley
@ 2026-01-29 9:48 ` Prasanna Kumar T S M
2026-02-04 6:02 ` Wei Liu
4 siblings, 0 replies; 9+ messages in thread
From: Prasanna Kumar T S M @ 2026-01-29 9:48 UTC (permalink / raw)
To: mhklinux, kys, haiyangz, wei.liu, decui, longli, lpieralisi,
kwilczynski, mani, robh, bhelgaas
Cc: linux-pci, linux-kernel, linux-hyperv
On 11-01-2026 22:30, mhkelley58@gmail.com wrote:
> From: Michael Kelley <mhklinux@outlook.com>
>
> Field pci_bus in struct hv_pcibus_device is unused since
> commit 418cb6c8e051 ("PCI: hv: Generify PCI probing"). Remove it.
>
> No functional change.
>
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
> ---
> drivers/pci/controller/pci-hyperv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 1e237d3538f9..7fcba05cec30 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -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;
Reviewed-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
Regards,
Prasanna Kumar
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-11 17:00 [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device mhkelley58
` (3 preceding siblings ...)
2026-01-29 9:48 ` Prasanna Kumar T S M
@ 2026-02-04 6:02 ` Wei Liu
4 siblings, 0 replies; 9+ messages in thread
From: Wei Liu @ 2026-02-04 6:02 UTC (permalink / raw)
To: mhklinux
Cc: kys, haiyangz, wei.liu, decui, longli, lpieralisi, kwilczynski,
mani, robh, bhelgaas, linux-pci, linux-kernel, linux-hyperv
On Sun, Jan 11, 2026 at 09:00:34AM -0800, mhkelley58@gmail.com wrote:
> From: Michael Kelley <mhklinux@outlook.com>
>
> Field pci_bus in struct hv_pcibus_device is unused since
> commit 418cb6c8e051 ("PCI: hv: Generify PCI probing"). Remove it.
>
> No functional change.
>
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
It looks like this trivial patch is not yet picked up. I've queued it
up.
Thanks,
Wei
> ---
> drivers/pci/controller/pci-hyperv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 1e237d3538f9..7fcba05cec30 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -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
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
2026-01-29 4:35 ` Michael Kelley
@ 2026-02-04 12:37 ` mani
0 siblings, 0 replies; 9+ messages in thread
From: mani @ 2026-02-04 12:37 UTC (permalink / raw)
To: Michael Kelley
Cc: lpieralisi@kernel.org, kwilczynski@kernel.org, robh@kernel.org,
bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org,
kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, longli@microsoft.com
On Thu, Jan 29, 2026 at 04:35:29AM +0000, Michael Kelley wrote:
> From: mhkelley58@gmail.com <mhkelley58@gmail.com> Sent: Sunday, January 11, 2026 9:01 AM
> >
> > From: Michael Kelley <mhklinux@outlook.com>
> >
> > Field pci_bus in struct hv_pcibus_device is unused since
> > commit 418cb6c8e051 ("PCI: hv: Generify PCI probing"). Remove it.
> >
> > No functional change.
> >
> > Signed-off-by: Michael Kelley <mhklinux@outlook.com>
>
> Could a PCI maintainer give an Ack for this trivial patch?
>
I see this got queued by Wei Liu, but FWIW:
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
- Mani
> Thx, Michael
>
> > ---
> > drivers/pci/controller/pci-hyperv.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> > index 1e237d3538f9..7fcba05cec30 100644
> > --- a/drivers/pci/controller/pci-hyperv.c
> > +++ b/drivers/pci/controller/pci-hyperv.c
> > @@ -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
> >
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-02-04 12:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 17:00 [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device mhkelley58
2026-01-12 14:29 ` Srivatsa S. Bhat
2026-01-12 15:54 ` Michael Kelley
2026-01-12 16:55 ` Srivatsa S. Bhat
2026-01-12 17:01 ` Easwar Hariharan
2026-01-29 4:35 ` Michael Kelley
2026-02-04 12:37 ` mani
2026-01-29 9:48 ` Prasanna Kumar T S M
2026-02-04 6:02 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox