Re: [PATCH v3 2/2] cxl/edac: Mask DPA flags in the event record cache key
From: Jongwon Lee
Date: Mon Nov 02 2026 - 07:37:23 EST
Hi Richard,
On Mon, Nov 02, 2026 at 04:30:57PM +0800, Richard Cheng wrote:
> Maybe something like the following to follow the pattern of rb_parent
> hiding the packed address and metadata encoding ?
>
> ```
> #define CXL_EVENT_DPA(hdr) \
> (le64_to_cpu((hdr)->phys_addr) & CXL_DPA_MASK)
> ```
>
> Or at least make it static inline.
I'd like to keep it a function so the argument stays type checked, as
coding-style.rst prefers for function-like macros. I'll make both
helpers static inline, which is what v4 does.
cxl_event_trace_record() in mbox.c open-codes the same mask. If a shared
helper next to CXL_DPA_MASK in trace.h is wanted, I can do that as a
separate cleanup so this fix stays small for stable.
Thanks again for the review,
Jongwon