Received: by 2002:a89:28c:0:b0:1ef:fe5e:92fe with SMTP id j12csp25394lqh; Sun, 17 Mar 2024 19:30:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJMoo0EJfqvFzvdK4pQDYZsCKoL+NGxFJ6CQdS9kFWUFnVUOrEpOrFPUZ+Ebpf41b97SsUMHoZCQKh/Qp49VWY3Lza8QRS/raQNCrS1A== X-Google-Smtp-Source: AGHT+IG5a30jwz2GmmE3yg8gdwNSb8u4U81/xsF40y1mircWuU2C1EMmnRDdZNRmtRi0MuB54SEx X-Received: by 2002:a17:90a:128d:b0:29f:9880:c41 with SMTP id g13-20020a17090a128d00b0029f98800c41mr1896980pja.31.1710729012609; Sun, 17 Mar 2024 19:30:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710729012; cv=pass; d=google.com; s=arc-20160816; b=kO4H1+P2zwfwO//ZV5uvGMhr+nz1hXqDtscpQo2mBECbYFkNDtIuyHMSrH+aFtwCp3 gIucQG0BF6rNMvfstxfyn63MDgwYcERblHGu1I5C+aLr/YzPOBauFvmtFBDUrCh+JKjl yMa4A5wZO9BAxq9J/eWeDxr62sfa8XxLAc0RQlb7jHGcvutnnIaMTW6iMXZO8fbddruF 7SoMKEhVnCfx6jNA35qwaTHNRXINUGv8bQRVa+oy3DMRuZ3D60XCmPrT9wqZt6hram0f BP4q7T4AScjcuxJgkWVVtJ/E3cR+xrDg7yo37I6pJuq9vn1rUJaWLe2yClX2kgzm4B0T TtAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=diqQmOzfLwLwL85DxInF1qsxpNVOMPZ3dIGcRRd1ZAs=; fh=THceKWCtyOM8T71n+Q5QIvqKOPz0bUkcXt3X3pTmXOM=; b=lmUNdk6FcvFpqe9YBGMvtnOyp7bFMga1q23SPqP5nMPNkzMPYEvfpYDpmXKujRGLA7 /Yv/DMdf11R8H8MEwu2IBaQmYq2fgaNSN4y+2VQN8m1evMTcDuQWGu9QOxpNdr8IRxHu dRNOGXsXuoKUsh/6KNSWqANKBEooZjWb4yHZ7r7LqDy8uv2prKIEqKjqy0pnq6SNrk+P A+oxIm1O3UloHJ+DS8fXgEWW4J37v9+P/JKxnv3Q65XHnuX8QfvvbQpPN8GwmiX5K93v 6fgpQ9Njlg1QmdUBUGzZCqMSYgIkFmehaY3SnUDBvqP4oUtT1I+XhMSESRas8VI4IMs4 gkYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=phytium.com.cn); spf=pass (google.com: domain of linux-kernel+bounces-105656-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105656-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id mh7-20020a17090b4ac700b0029df60e0ff9si5970614pjb.23.2024.03.17.19.30.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 19:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105656-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=phytium.com.cn); spf=pass (google.com: domain of linux-kernel+bounces-105656-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105656-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 48F4E282646 for ; Mon, 18 Mar 2024 02:30:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CD1F1E865; Mon, 18 Mar 2024 02:30:01 +0000 (UTC) Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 015771DA58; Mon, 18 Mar 2024 02:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.97.181.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710729001; cv=none; b=KzNNr+PXV9p9ZiCS6P7d8LXRtWDdRK42+RhHH0VurUx0CFviejRaGmK8cakeCC5ihFQnxn/dFmPXhy+UQXwtpMR+JgvEjiSFh0nGFuoBcMLRS9avKVaCU5sTghPEpd5SrWn6h+sFkyVZKlD3tCDEH78LGCpWn+f+2S1F0uovApI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710729001; c=relaxed/simple; bh=Vzfj5o6D7Na/6aOu8CV74Zqtv20GrJloloDTpGKeZZU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=M5Y+nRrecjupZyiiP2t1IA4Xi2Cv39V75cwyuYb/AjAIV0JCUHg7RPTmhFBgZayrWkSqe+UTVFhr3Tfe5lKFb1hfhnjIFcNHLaTXk9tKiYfzIeTcJhBX1TlY1RjNyTBO3lBr6rNY5sFIxHA++5Qt4x0L64/hYgOr4eFsPzoE3yk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phytium.com.cn; spf=pass smtp.mailfrom=phytium.com.cn; arc=none smtp.client-ip=209.97.181.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phytium.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=phytium.com.cn Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-6 (Coremail) with SMTP id AQAAfwCHNwgbp_dlClvTBg--.42586S2; Mon, 18 Mar 2024 10:29:47 +0800 (CST) Received: from phytium.com.cn (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwDXXNEPp_dlAEUAAA--.183S4; Mon, 18 Mar 2024 10:29:39 +0800 (CST) From: Yuquan Wang To: ira.weiny@intel.com, jonathan.cameron@huawei.com, dan.j.williams@intel.com Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, chenbaozi@phytium.com.cn, Yuquan Wang Subject: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle Date: Mon, 18 Mar 2024 10:29:28 +0800 Message-Id: <20240318022928.509130-2-wangyuquan1236@phytium.com.cn> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240318022928.509130-1-wangyuquan1236@phytium.com.cn> References: <20240318022928.509130-1-wangyuquan1236@phytium.com.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:AQAAfwDXXNEPp_dlAEUAAA--.183S4 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQAIAWX3ReYBDQAAs1 Authentication-Results: hzbj-icmmx-6; spf=neutral smtp.mail=wangyuquan 1236@phytium.com.cn; X-Coremail-Antispam: 1Uk129KBjvdXoW7Jw1rXryDuFW7uFWfGF18uFg_yoWfAFb_CF 10qF1xuw4YkFnak342krsYvrySvw1rWF4S9r1qqFW5J347Zw13JFZ09rnFyrnxXrWUAr17 ZFy3XryFkrnxWjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrnU Uv73VFW2AGmfu7jjvjm3AaLaJ3UjIYCTnIWjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRUUUUU UUUU= 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. Signed-off-by: Yuquan Wang --- drivers/cxl/core/mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index 9adda4795eb7..b810a6aa3010 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -915,7 +915,7 @@ static int cxl_clear_event_record(struct cxl_memdev_state *mds, payload->handles[i++] = gen->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; -- 2.34.1