Re: [PATCH v4 1/2] cxl/edac: Read cached DRAM event records under the xarray lock

From: Jongwon Lee

Date: Thu Nov 05 2026 - 03:44:58 EST


Hi Ming,

Thanks for the review.

On 11/5/26 15:42, Li Ming wrote:
>> + xa_lock(&array_rec->rec_dram);
>> + rec = __cxl_find_rec_dram(&array_rec->rec_dram, attrbs);
>> + found = rec;
>> + if (rec && out)
>> + *out = *rec;
>> + xa_unlock(&array_rec->rec_dram);
>> +
>> + return found;
> I think this "found" is not needed, "return rec;" or "return (rec !=
> NULL);" is enough?

Right, the pointer is only compared after the unlock and never
dereferenced, so found is not needed. I'll return rec != NULL in v5 and
keep your and Richard's Reviewed-by.

Thanks,
Jongwon