From: Bjorn Helgaas <helgaas@kernel.org>
To: Fan Fei <ffclaire1224@gmail.com>
Cc: linux-pci@vger.kernel.org, bjorn@helgaas.com
Subject: Re: [PATCH 00/13] Unify device * to platform_device *
Date: Wed, 29 Dec 2021 11:14:12 -0600 [thread overview]
Message-ID: <20211229171412.GA1686464@bhelgaas> (raw)
In-Reply-To: <20211228193801.GA54107@claire-ThinkPad-T470>
On Tue, Dec 28, 2021 at 08:38:01PM +0100, Fan Fei wrote:
> On Wed, Dec 22, 2021 at 06:43:37PM -0600, Bjorn Helgaas wrote:
> > On Sat, Nov 27, 2021 at 03:11:08PM +0100, Fan Fei wrote:
> > > Some PCI controller structs contain "device *", while others contain
> > > "platform_device *". These patches unify "device *dev" to
> > > "platform_device *pdev" in 13 controller struct, to make the controller
> > > struct more consistent. Consider that PCI controllers interact with
> > > platform_device directly, not device, to enumerate the controlled
> > > device.
> >
> > I went through all the controller drivers using a command like this:
> >
> > git grep -A4 -E "^struct .*_pci.?\> \{$" drivers/pci/controller/
> >
> > and found that almost all of them hang onto the "struct device *", not
> > the "struct platform_device *". Many of these are buried inside struct
> > dw_pcie and struct cdns_pcie.
> >
> Do you mean most of these structs contain dw_pcie and cdns_pcie, both of
> which contain "sturct device *"?
Yes.
> > I know I've gone back and forth on this, but I don't think the churn of
> > converting some of them to keep the "struct platform_device *" would be
> > worthwhile.
> >
> I could convert "platform_device *" back to "device *", e.g. in the
> pcie-altear.c. What do you think?
No, I don't think we should do that. I don't think there's really any
benefit right now.
Bjorn
prev parent reply other threads:[~2021-12-29 17:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-27 14:11 [PATCH 00/13] Unify device * to platform_device * Fan Fei
2021-11-27 14:11 ` [PATCH 01/13] PCI: xilinx: Replace device * with " Fan Fei
2021-11-27 14:11 ` [PATCH 02/13] PCI: mediatek: " Fan Fei
2021-11-27 14:11 ` [PATCH 03/13] PCI: tegra: " Fan Fei
2021-11-27 14:11 ` [PATCH 04/13] PCI: xegene: " Fan Fei
2021-11-27 14:11 ` [PATCH 05/13] PCI: microchip: " Fan Fei
2021-11-27 14:11 ` [PATCH 06/13] PCI: brcmstb: " Fan Fei
2021-11-27 14:11 ` [PATCH 07/13] PCI: mediatek-gen3: " Fan Fei
2021-11-27 14:11 ` [PATCH 08/13] PCI: rcar-gen2: " Fan Fei
2021-11-27 14:11 ` [PATCH 09/13] PCI: ftpci100: " Fan Fei
2021-11-27 14:11 ` [PATCH 10/13] PCI: v3-semi: " Fan Fei
2021-11-27 14:11 ` [PATCH 11/13] PCI: ixp4xx: " Fan Fei
2021-11-27 14:11 ` [PATCH 12/13] PCI: xilinx-nwl: " Fan Fei
2021-11-27 14:11 ` [PATCH 13/13] PCI: rcar: " Fan Fei
2021-12-23 0:43 ` [PATCH 00/13] Unify device * to " Bjorn Helgaas
2021-12-28 19:38 ` Fan Fei
2021-12-29 17:14 ` Bjorn Helgaas [this message]
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=20211229171412.GA1686464@bhelgaas \
--to=helgaas@kernel.org \
--cc=bjorn@helgaas.com \
--cc=ffclaire1224@gmail.com \
--cc=linux-pci@vger.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;
as well as URLs for NNTP newsgroup(s).