lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMJFtZHJBOLLMHIX@wunner.de>
Date: Thu, 11 Sep 2025 05:44:53 +0200
From: Lukas Wunner <lukas@...ner.de>
To: "Bowman, Terry" <terry.bowman@....com>
Cc: dave@...olabs.net, jonathan.cameron@...wei.com, dave.jiang@...el.com,
	alison.schofield@...el.com, dan.j.williams@...el.com,
	bhelgaas@...gle.com, shiju.jose@...wei.com, ming.li@...omail.com,
	Smita.KoralahalliChannabasappa@....com, rrichter@....com,
	dan.carpenter@...aro.org, PradeepVineshReddy.Kodamati@....com,
	Benjamin.Cheatham@....com,
	sathyanarayanan.kuppuswamy@...ux.intel.com,
	linux-cxl@...r.kernel.org, alucerop@....com, ira.weiny@...el.com,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH v11 20/23] CXL/PCI: Export and rename merge_result() to
 pci_ers_merge_result()

On Wed, Sep 10, 2025 at 10:57:17AM -0500, Bowman, Terry wrote:
> On 8/27/2025 3:04 AM, Lukas Wunner wrote:
> > 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.
> 
> The move of local merge_result() to exported pci_merge_result() was requested
> by Jonathan Cameron:
> https://lore.kernel.org/linux-cxl/20250627120541.00003a14@huawei.com/
> 
> I believe the intent was to make reuse of the PCI merge function to keep the
> PCI and CXL UCE flows somewhat similar.

That's not my point.  My point is, can you avoid declaring the static inline
in include/linux/pci.h if you move it to drivers/cxl/ and encapsulate by
"#ifndef CONFIG_PCIEAER"?  I'm only referring to the static inline stub.

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ