Skip to content

Commit b7c59b0

Browse files
Yuquan Wangdavejiang
authored andcommitted
cxl/mem: Fix for the index of Clear Event Record Handle
The dev_dbg info for Clear Event Records mailbox command would report the handle of the next record to clear not the current one. This was because the index 'i' had incremented before printing the current handle value. Fixes: 6ebe28f ("cxl/mem: Read, trace, and clear events on driver load") Signed-off-by: Yuquan Wang <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Dan Williams <[email protected]> Reviewed-by: Fan Ni <[email protected]> Signed-off-by: Dave Jiang <[email protected]>
1 parent 4cece76 commit b7c59b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cxl/core/mbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ static int cxl_clear_event_record(struct cxl_memdev_state *mds,
915915

916916
payload->handles[i++] = gen->hdr.handle;
917917
dev_dbg(mds->cxlds.dev, "Event log '%d': Clearing %u\n", log,
918-
le16_to_cpu(payload->handles[i]));
918+
le16_to_cpu(payload->handles[i - 1]));
919919

920920
if (i == max_handles) {
921921
payload->nr_recs = i;

0 commit comments

Comments
 (0)