All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jongwon Lee <ai@linux.com>
To: Li Ming <ming.li@zohomail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Dan Williams <djbw@kernel.org>, Ira Weiny <iweiny@kernel.org>,
	Richard Cheng <icheng@nvidia.com>,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] cxl/edac: Read cached DRAM event records under the xarray lock
Date: Thu, 05 Nov 2026 17:42:12 +0900	[thread overview]
Message-ID: <20261105084212.55292-lm1-ai@linux.com> (raw)
In-Reply-To: <417b4379-4f6a-4a31-b2a4-f6f84b13d362@zohomail.com>

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

  reply	other threads:[~2026-11-05  8:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 12:32 [PATCH v4 0/2] cxl/edac: Fix event record lookups for memory repair Jongwon Lee
2026-11-02 12:32 ` [PATCH v4 1/2] cxl/edac: Read cached DRAM event records under the xarray lock Jongwon Lee
2026-11-05  6:00   ` Richard Cheng
2026-11-05  7:42   ` Li Ming
2026-11-05  8:42     ` Jongwon Lee [this message]
2026-11-02 12:32 ` [PATCH v4 2/2] cxl/edac: Mask DPA flags in the event record cache key Jongwon Lee
2026-11-05  6:00   ` Richard Cheng
2026-11-05  8:20   ` Li Ming
2026-11-05  8:42     ` Jongwon Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261105084212.55292-lm1-ai@linux.com \
    --to=ai@linux.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=djbw@kernel.org \
    --cc=icheng@nvidia.com \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.