Re: [PATCH v19 04/14] cxl: Tighten CPER kfifo registration API and symbol visibility
From: Alison Schofield
Date: Mon Aug 03 2026 - 22:13:37 EST
On Mon, Aug 03, 2026 at 05:18:00PM -0500, Terry Bowman wrote:
> From: Dan Williams <djbw@xxxxxxxxxx>
>
> Tighten the CPER protocol error kfifo registration API and symbol
> visibility.
>
> Use EXPORT_SYMBOL_FOR_MODULES() instead of EXPORT_SYMBOL_NS_GPL() for
> the CPER kfifo registration symbols. This names the consuming module
> explicitly and gives compile-time enforcement.
>
> Drop the work_struct argument from the unregister path. Change the
> WARN_ONCE condition to a NULL check since there is no caller pointer
> to compare against anymore.
>
> Return void from the registration helpers whose result callers ignore.
> cxl_cper_register_work() keeps its int return as the only one consumed by
> a caller. Flag double registration with WARN_ONCE() inside the lock
> instead of returning an error.
>
> Change cxl_ras_init() to void because there is one consumer and one
> producer so the error return was unnecessary. Remove the now-dead error
> check in cxl_core_init().
Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>