Re: [PATCH v8 7/9] PCI/IDE: Add IDE establishment helpers

dan.j.williams
2025-11-10T22:21:34Z

Xu Yilun wrote:
> > +{
> > + if (!pci_is_pcie(pdev)) {
> > + pci_warn_once(pdev, "not a PCIe device\n");
> > + return NULL;
> > + }
> > +
> > + switch (pci_pcie_type(pdev)) {
> > + case PCI_EXP_TYPE_ENDPOINT:
> > + if (pdev != ide->pdev) {
> > + pci_warn_once(pdev, "setup expected Endpoint: %s\n", pci_name(ide->pdev));
> > + return NULL;
> > + }
> > + return &ide->partner[PCI_IDE_EP];
> > + case PCI_EXP_TYPE_ROOT_PORT: {
>
> No need the braces

Some older ARM compilers apparently still care:

http://lore.kernel.org/032cd284-1b0e-4d52-94d8-e37fc9a759fc@arm.com

...so, leaving this for now.