Patch "cxl/mem: Fix for the index of Clear Event Record Handle" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cxl/mem: Fix for the index of Clear Event Record Handle

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cxl-mem-fix-for-the-index-of-clear-event-record-hand.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 358944fe4cceb582a5082ba5b02eebbc28eb9ca4
Author: Yuquan Wang <wangyuquan1236@xxxxxxxxxxxxxx>
Date:   Mon Mar 18 10:29:28 2024 +0800

    cxl/mem: Fix for the index of Clear Event Record Handle
    
    [ Upstream commit b7c59b038c656214f56432867056997c2e0fc268 ]
    
    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: 6ebe28f9ec72 ("cxl/mem: Read, trace, and clear events on driver load")
    Signed-off-by: Yuquan Wang <wangyuquan1236@xxxxxxxxxxxxxx>
    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
    Reviewed-by: Dan Williams <dan.j.williams@xxxxxxxxx>
    Reviewed-by: Fan Ni <fan.ni@xxxxxxxxxxx>
    Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index b12986b968da4..e5f3592e54191 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -928,7 +928,7 @@ static int cxl_clear_event_record(struct cxl_memdev_state *mds,
 	for (cnt = 0; cnt < total; cnt++) {
 		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]));
+			le16_to_cpu(payload->handles[i - 1]));
 
 		if (i == max_handles) {
 			payload->nr_recs = i;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux