Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp101750rdb; Thu, 1 Feb 2024 03:29:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEl7E7M/vMb34Oea6177D+clxN5qZac1ZLTO0nMqKQLUu+tLTkkhz8+yLN/Ne3wxEIylNvS X-Received: by 2002:a17:903:278d:b0:1d8:edf1:60a9 with SMTP id jw13-20020a170903278d00b001d8edf160a9mr3919465plb.3.1706786944588; Thu, 01 Feb 2024 03:29:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706786944; cv=pass; d=google.com; s=arc-20160816; b=TBPX4yD/wYYR1ohw39/xylksM/zdgGUIufImTSy27GmrHFhPvy3j2pf4TiOTG0VudS 8XNylQWnKKvUadwxRNB1dMKrPlyeRFgPOgWsaQowKLTmUBgLLxvEX1WVAbVJzoNzoSkE 3Vf8QRl6JJWFiTY9xPs1ZTy72f9t9QwmBViZqUEYBzoSlZr93R+m9cAp3wJ4IQH6N7jd KgjCZ0EHUe+Fu2jWtmEW5D9WOKfDqxIvYx6/UXtlDbAgDiDKQ6VNgiFE2+ky34F4jy2+ 3kX5vN0QROuTUzTzVxn2X+gAP/dt3ylpFdcoUdC7Lb7ZTICPH0EbhJtjcHaaTh3ZyzAt YQeg== 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=2rQUgpSuAwvjMRgrzZDXRFcVDBx1DjzJj8194j0ZGMk=; fh=pm+gelw3DVY+fymE+lHWSgtx/n/Ng1cG4Te9ZCY2eVo=; b=n6QzKYsEX7H9rs5hcXRvBZrhqkIXllQ7MRQp1LEHu+xUQ6hpainhiRnAGdz2Iu1gP7 5nHuewn8SPIttr4Z+2Xr8LkjH6+gCko3mR8NcFHXjaoG8yvwgn/9Leo7H6AtjUuOOMjS Rmy+CppQoKw7yU88ZzOnwF+Sx9V+Nllxfh68l44NFDppQ3K9VUI4Q27larKoqrtKdv9R 0rnrSC2Df+XiByrm7A9QuSrrpSjBxUNSPO5ewJO5hyd99hcAa56LSulQu8Trnqr0+7Ib pv6CpLgASJepHfd01E3mFbXmWbOwbCfWrPJEzWrwJ20t9sZzAbv9cs089Fz4JjdLf67Q iDJA==; 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-48006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com X-Forwarded-Encrypted: i=1; AJvYcCUyTJXZZ7pluEj5S1kEdqCTZu1sGGi8J5gY8sXSzy4Vl0Y+rgWfnpArO8Xk+n/4Ls6okRYXt6ajAsFdmfk0Ho4g81PjfV7RhllkSn5oKw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k8-20020a170902c40800b001d8ded24c8esi8192678plk.143.2024.02.01.03.29.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 03:29:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-48006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48006-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 46CFFB25A78 for ; Thu, 1 Feb 2024 11:23:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F41A315CD75; Thu, 1 Feb 2024 11:23:21 +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 76CE815B970; Thu, 1 Feb 2024 11:23:18 +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=1706786601; cv=none; b=tCHMHEFsojt0LUcgpj1kCFZCDp54z0yFIfUI0yuge+l/fgU9oYuNRB0tJqh1+s/2QDB0rtwylAzWZRVUwADabKBSZnCDrxrgAkIIyb8pDPIXnTUNvFtOcfpKn8T7hXXKNyWFEvpWmwYq0g1k3h4M5Q9aBaqOVqIIwL6AiTuhZ/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706786601; c=relaxed/simple; bh=lix+9YkAqqOOpOyydIQmC81jZuQWHhwyMTu4skQlNZA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=P04tWhVladxosxb/G9Dg1j7bxwwBm2jnceX1zOllEsGolBnT5U510l6DcSgkMrDUei6mE4R2NHNklOPnlcp/R1/xFiGuF1NcYSmgWx8xwFGCeVYF4I105JEnXU2Vz6Pi17ybVK/dGEH2xSFqVnaZe7mUfpUNZAs4kBIcmvF86tI= 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 4TQbzW5Mgrz6K807; Thu, 1 Feb 2024 19:20:07 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id B27951409EA; Thu, 1 Feb 2024 19:23:15 +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_128_GCM_SHA256) id 15.1.2507.35; Thu, 1 Feb 2024 11:23:15 +0000 Date: Thu, 1 Feb 2024 11:23:14 +0000 From: Jonathan Cameron To: Alison Schofield CC: Ira Weiny , Dan Williams , Davidlohr Bueso , Dave Jiang , Vishal Verma , , , , Subject: Re: [PATCH 2/2] cxl/trace: Remove unnecessary memcpy's Message-ID: <20240201112314.00005dbc@Huawei.com> In-Reply-To: References: <20240131-cxl-cper-fixups-v1-0-335c85b1d77b@intel.com> <20240131-cxl-cper-fixups-v1-2-335c85b1d77b@intel.com> 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: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 31 Jan 2024 17:17:55 -0800 Alison Schofield wrote: > On Wed, Jan 31, 2024 at 03:55:39PM -0800, Ira Weiny wrote: > > CPER events don't have UUIDs. Therefore UUIDs were removed from the > > records passed to trace events and replaced with hard coded values. > > > > As pointed out by Jonathan, the new defines for the UUIDs present a more > > efficient way to assign UUID in trace records.[1] > > > > Replace memcpy's with the use of static data. > > Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron > > > > > > [1] https://lore.kernel.org/all/20240108132325.00000e9c@Huawei.com/ > > > > Suggested-by: Jonathan Cameron > > Signed-off-by: Ira Weiny > > --- > > drivers/cxl/core/trace.h | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h > > index 89445435303a..bdf117a33744 100644 > > --- a/drivers/cxl/core/trace.h > > +++ b/drivers/cxl/core/trace.h > > @@ -338,7 +338,7 @@ TRACE_EVENT(cxl_general_media, > > > > TP_fast_assign( > > CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); > > - memcpy(&__entry->hdr_uuid, &CXL_EVENT_GEN_MEDIA_UUID, sizeof(uuid_t)); > > + __entry->hdr_uuid = CXL_EVENT_GEN_MEDIA_UUID; > > > > /* General Media */ > > __entry->dpa = le64_to_cpu(rec->phys_addr); > > @@ -425,7 +425,7 @@ TRACE_EVENT(cxl_dram, > > > > TP_fast_assign( > > CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); > > - memcpy(&__entry->hdr_uuid, &CXL_EVENT_DRAM_UUID, sizeof(uuid_t)); > > + __entry->hdr_uuid = CXL_EVENT_DRAM_UUID; > > > > /* DRAM */ > > __entry->dpa = le64_to_cpu(rec->phys_addr); > > @@ -573,7 +573,7 @@ TRACE_EVENT(cxl_memory_module, > > > > TP_fast_assign( > > CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); > > - memcpy(&__entry->hdr_uuid, &CXL_EVENT_MEM_MODULE_UUID, sizeof(uuid_t)); > > + __entry->hdr_uuid = CXL_EVENT_MEM_MODULE_UUID; > > > > /* Memory Module Event */ > > __entry->event_type = rec->event_type; > > > > -- > > 2.43.0 > > >