[PATCH] ARM: PCI: expand single-line pci_common_init() wrapper function

Andrew Lunn andrew at lunn.ch
Mon May 18 05:06:40 PDT 2026


On Sun, May 17, 2026 at 09:20:46PM -0700, Ethan Nelson-Moore wrote:
> Hi, Andrew,
> 
> On Sun, May 17, 2026 at 8:42 PM Andrew Lunn <andrew at lunn.ch> wrote:
> > Nobody seems to call pci_common_init_dev() without passing NULL. So i
> > think it makes more sense to rename pci_common_init_dev() to
> > pci_common_init() and drop struct device *parent parameter. You then
> > only need to change pci.h and bios32.c.
> 
> I considered that, but decided against it because it would prevent the
> code from easily being updated to pass a parent parameter in the
> future. However, given the age of the affected platforms, that is
> unlikely to happen, so your approach might make more sense. What do
> you think?

These are all old platforms, they are likely to be slowly removed over
the next few years, and then pci_common_init* can be removed. I don't
expect any code to need to set the parent. And some new board does
come along which needs it, it is an easy revert.

You could also include a tiny patch which removes parent from
pcibios_init_hw().

     Andrew



More information about the linux-arm-kernel mailing list