From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
<linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message
Date: Fri, 4 Aug 2023 13:16:12 +0100 [thread overview]
Message-ID: <20230804131612.0000770d@Huawei.com> (raw)
In-Reply-To: <20230731-cxl-fix-clear-event-debug-print-v2-1-9bdd08d386e9@intel.com>
On Tue, 01 Aug 2023 13:13:28 -0700
Ira Weiny <ira.weiny@intel.com> wrote:
> The handle value used to report an event being cleared by dev_dbg() is
> incorrect due to a post increment of the payload handle index.
>
> Delay the increment of the index until after the print.
>
> Fixes: 6ebe28f9ec72 ("cxl/mem: Read, trace, and clear events on driver load")
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
>
FWIW given how well this has already been reviewed.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> Changes for v2
> [Dan] Go ahead and mark this for backporting
> [Dan] Remove 'To/Cc' cruft from individual patches
> [Dan/Alison] Split out the additional debugging
> [Alison] New oneliner
> ---
> drivers/cxl/core/mbox.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index d6d067fbee97..a1c490f66bbf 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
> @@ -882,9 +882,10 @@ static int cxl_clear_event_record(struct cxl_memdev_state *mds,
> */
> i = 0;
> for (cnt = 0; cnt < total; cnt++) {
> - payload->handles[i++] = get_pl->records[cnt].hdr.handle;
> + payload->handles[i] = get_pl->records[cnt].hdr.handle;
> dev_dbg(mds->cxlds.dev, "Event log '%d': Clearing %u\n", log,
> le16_to_cpu(payload->handles[i]));
> + i++;
>
> if (i == max_handles) {
> payload->nr_recs = i;
>
next prev parent reply other threads:[~2023-08-04 12:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 20:13 [PATCH v2 0/2] CXL/events: Fix and improve event dev_dbg() messages Ira Weiny
2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny
2023-08-01 20:41 ` Dave Jiang
2023-08-02 16:26 ` Alison Schofield
2023-08-04 12:16 ` Jonathan Cameron [this message]
2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny
2023-08-01 20:41 ` Dave Jiang
2023-08-02 16:29 ` Alison Schofield
2023-08-03 5:05 ` Ira Weiny
2023-08-03 17:26 ` Alison Schofield
2023-08-04 12:17 ` Jonathan Cameron
2023-08-03 17:26 ` Alison Schofield
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=20230804131612.0000770d@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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.