Re: [PATCH v11 20/23] CXL/PCI: Export and rename merge_result() to pci_ers_merge_result()

Lukas Wunner
2025-08-27T08:04:14Z

On Tue, Aug 26, 2025 at 08:35:35PM -0500, Terry Bowman wrote:
> +++ b/include/linux/pci.h
> @@ -2760,6 +2760,17 @@ static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev)
> void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type);
> #endif
>
> +#if defined(CONFIG_PCIEAER)
> +pci_ers_result_t pci_ers_merge_result(enum pci_ers_result orig,
> + enum pci_ers_result new);
> +#else
> +static inline pci_ers_result_t pci_ers_merge_result(enum pci_ers_result orig,
> + enum pci_ers_result new)
> +{
> + return PCI_ERS_RESULT_NONE;
> +}
> +#endif
> +
> #include <linux/dma-mapping.h>
>
> #define pci_emerg(pdev, fmt, arg...) dev_emerg(&(pdev)->dev, fmt, ##arg)

Would it be possible for you to just declare a local version of
pci_ers_merge_result() within drivers/cxl/ which is encapsulated by
"#ifndef CONFIG_PCIEAER"?

That would avoid the need to make this public in include/linux/pci.h.

Thanks,

Lukas