[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aWUnjXIMgE--hCgg@csail.mit.edu>
Date: Mon, 12 Jan 2026 22:25:41 +0530
From: "Srivatsa S. Bhat" <srivatsa@...il.mit.edu>
To: Michael Kelley <mhklinux@...look.com>
Cc: "kys@...rosoft.com" <kys@...rosoft.com>,
"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
"decui@...rosoft.com" <decui@...rosoft.com>,
"longli@...rosoft.com" <longli@...rosoft.com>,
"lpieralisi@...nel.org" <lpieralisi@...nel.org>,
"kwilczynski@...nel.org" <kwilczynski@...nel.org>,
"mani@...nel.org" <mani@...nel.org>,
"robh@...nel.org" <robh@...nel.org>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
Subject: Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct
hv_pcibus_device
On Mon, Jan 12, 2026 at 03:54:51PM +0000, Michael Kelley wrote:
> From: Srivatsa S. Bhat <srivatsa@...il.mit.edu> Sent: Monday, January 12, 2026 6:29 AM
> > Hi Michael,
> >
> > On Sun, Jan 11, 2026 at 09:00:34AM -0800, mhkelley58@...il.com wrote:
> > > From: Michael Kelley <mhklinux@...look.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@...look.com>
> >
> > Reviewed-by: Srivatsa S. Bhat (Microsoft) <srivatsa@...il.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
> > >
> > >
Powered by blists - more mailing lists