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