From: "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>
To: Michael Kelley <mhklinux@outlook.com>
Cc: "kys@microsoft.com" <kys@microsoft.com>,
"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
"decui@microsoft.com" <decui@microsoft.com>,
"longli@microsoft.com" <longli@microsoft.com>,
"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
"kwilczynski@kernel.org" <kwilczynski@kernel.org>,
"mani@kernel.org" <mani@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>
Subject: Re: [PATCH 1/1] PCI: hv: Remove unused field pci_bus in struct hv_pcibus_device
Date: Mon, 12 Jan 2026 22:25:41 +0530 [thread overview]
Message-ID: <aWUnjXIMgE--hCgg@csail.mit.edu> (raw)
In-Reply-To: <SN6PR02MB4157BFB422607900AC1EBD82D481A@SN6PR02MB4157.namprd02.prod.outlook.com>
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
> > >
> > >
next prev parent reply other threads:[~2026-01-12 16:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWUnjXIMgE--hCgg@csail.mit.edu \
--to=srivatsa@csail.mit.edu \
--cc=bhelgaas@google.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kwilczynski@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=mhklinux@outlook.com \
--cc=robh@kernel.org \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox