Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp134243lqt; Mon, 18 Mar 2024 03:59:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVo+ubLUzBaKkZvdtB3wGpEWM4Vn5QffPiabsGaTqb7g86CQ1Fl+PdclnIpRhUAeaKsXha9ZWDwyM7a5kBmUU7hzdh/u+NUoCdBTautBQ== X-Google-Smtp-Source: AGHT+IHqI5mUh8ff71Ufgl8cbJd02hqtpvm3KuyWARkyvm+XSYcr/p7G548td6qbIhq55vbN9j56 X-Received: by 2002:a17:906:fcb6:b0:a3e:da6:85f8 with SMTP id qw22-20020a170906fcb600b00a3e0da685f8mr6731626ejb.30.1710759576689; Mon, 18 Mar 2024 03:59:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710759576; cv=pass; d=google.com; s=arc-20160816; b=vgCxRzGfJF1f32JihdkT8si4bDr5UTHKnxg3Kh/P5rVI+PeTPs6+E8+hSYxeTaKU/x jQOHFUEUjyjmstAu77ecwGuHwiidpn2c/zyjVpsvH5MChw+dzRvZdG7ohduYjqxPkryc XlEFCYh1ZFicRL1vlGvw/S+wQjinskotG+hHDt4aQzCE+53CrRg5BiWOc45njMWAYu8M JH46h2iSdES61zM+V8HU6ENBq11UrimLnqFtGaNOTTWqnU8H0Iw2y3Uql5YSCPD5z/3J A7ABHkEhF68C2NCMviBuCn2F1MfyE1ZrWGCCZfav3g41qGN/K2sNGBW4xqJB8eZz9lrJ jrTw== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=cPbw79kNb/ZKtYRAzsr9Wm8Np6Qs6jqPDIo+Tad8BhE=; fh=tBsX9DfUnaiiOweaO6Ujdaq2ilimqfSv2QrdroVk2yc=; b=wpVvs1FXdg05ROo8AQZ73kYKbX6vAj8SUdt6HXl7wk6HsDIbFYpQYlwaZvAHyfYSwh CTTdvsncsQqdi0zEwy2eFlv4pCWsVBKiAN2JViNaueQdhwziWJ2bhdAr9LpRn1BRxMer YT5esE2kvLvnf7e4OtXSWSLt7LBYJM8CK0G20BwCnNTNoZ+m6PZomg2SLDYt3759Cpvt eIgZglUhzJQ3UVo8zGDuuVS8YGbTcHOJktsJ3nqdP2ox7GgAaSdcvN5sFDeDk+Jdn8Oz btK5NfspURk6OXZy1/A3dbB9sM1/KQuc1LQVHHIO6uoHrh7YFj130FNyV8sh4I7cInSB anhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-106028-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106028-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id js11-20020a17090797cb00b00a46b88d73b8si1299644ejc.400.2024.03.18.03.59.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 03:59:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106028-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-106028-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106028-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 69A801F2483C for ; Mon, 18 Mar 2024 10:59:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D432536AE0; Mon, 18 Mar 2024 10:59:11 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F3BD364A9; Mon, 18 Mar 2024 10:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710759551; cv=none; b=hqf7Kyp8dq/wu7Hl1UVm+zwFcVtMBhshlQ6skjpYSHIs235hObzmnQkVM0Vtg854kEIDGG3V8MvFCFnePaRsFo/HponiXR+I4uaBmw+Ts2P6eyD1xsxqdS763XJsy8o8nilUdyov4blOP+g3WIQ3FIGGHTy/879XjjdmZD2yaAg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710759551; c=relaxed/simple; bh=3HWVhv5FCQZGsoqeZ8uU7NkyNl7/wt+/4DunrTQoGyg=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GhGdeaUraBlv/iAUK7Aods/Iss3d26GZz9BM2VzQGJQEDZd+/bAvTRonoNH4zC5U56L6g7hyghiiLBhlB7cAKzDS8yanVjj6h5NVtKQIIdoMT9aEueAvvB9XdwUEbKT+/+hZvuMLNpikrdgwarryMPN3xAdYwh1hqh2mBY3gryE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TysKR39Y6z6K6Pg; Mon, 18 Mar 2024 18:58:35 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id E181E14322E; Mon, 18 Mar 2024 18:59:00 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 18 Mar 2024 10:57:48 +0000 Date: Mon, 18 Mar 2024 10:57:48 +0000 From: Jonathan Cameron To: Yuquan Wang CC: , , , , , Subject: Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle Message-ID: <20240318105748.000072c5@Huawei.com> In-Reply-To: <20240318022928.509130-2-wangyuquan1236@phytium.com.cn> References: <20240318022928.509130-1-wangyuquan1236@phytium.com.cn> <20240318022928.509130-2-wangyuquan1236@phytium.com.cn> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To lhrpeml500005.china.huawei.com (7.191.163.240) On Mon, 18 Mar 2024 10:29:28 +0800 Yuquan Wang wrote: > 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])); Trivial but needs spaces around the -. e.g. [i - 1] Maybe Dan can fix up whilst applying. Otherwise Reviewed-by: Jonathan Cameron > > if (i == max_handles) { > payload->nr_recs = i;