Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1035899rbb; Sun, 25 Feb 2024 16:34:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW5oL5hDTe68mQ1DH/m+5RTTN0RpxYNAaYE+VsW+ykujYkAawMY8VUY2kjBUO5TVtHWMtjxrALW1O88ZuMg8sc8j/w/BNGU9RraCrSFIQ== X-Google-Smtp-Source: AGHT+IFIY7ueiIz4XM7gXrsK7fvLyYJoLMuXZsa/+7ziw0K8HiskdGdQvah4MXRuAKRUrnVWwIw1 X-Received: by 2002:a92:cb90:0:b0:365:32b:602b with SMTP id z16-20020a92cb90000000b00365032b602bmr6093382ilo.11.1708907674363; Sun, 25 Feb 2024 16:34:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708907674; cv=pass; d=google.com; s=arc-20160816; b=ZLGEi7foaw1OWClKeU61zff7uRXtEjUAoJgXkeuYsS6h7b9WQwivzz0Gc9rgb/I0QN ge4aLUUXMueRk12S3xK2VqZZhM5OQHzxFDXoIP1TMzn70z8X/JyDhdhiBfz4mpXK0soq NmAEU7mF1IccDDHzYCSOqA6Q3FHe13BtQPnIAo7nZm4dYlgxzdaI6m24oket8yewbSrN es5wEJz2nppi1CjSlU5weHhWKqXUnPVszd8I85k9Lpvo5IP2VOkgahrN6VH6D9T2sDmC C6uZXCwZ1E1MJcffUg4Hob3/o9vA8IfS7OI1FXGVnJOHWvIfJnSHZQsycLM176HaaFC0 GmGA== 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 :subject:cc:to:from:date:dkim-signature; bh=yIS7Jf+Ev172ynEdbu/d+eMt+JcZyKh0+PxWVCVM2dU=; fh=urpwA9qFkHTMgj2GGwgW1EOwrKQ3iojgE0lW0ov8vP0=; b=dmyZoUA0cssEeOXa14K4OrrNLj77NVhXIwXpAJVh7aEo7crWdVT9jSlaq+q8aAtq6u wbYRoiV0C4TESiSB7ls/YmJdC7Q/mPvwU41wminbM21B+6ZSr6QqG1D+1RYSQ/CqON4P ci7VmD/7rDF0yu7iP3++Y5q/MLXyptrKh4pICKE7z4kJxkEQUWqaIVqZ/+RA8ZgA1m1/ HrLwVc0fStQ1ezfgpCtl68W/RDCIaumuqXusrMSvR07RA7kAlJS0ZLjMg0lhIMNXwAMV ZXov7sUH39AYp8EO0uy19y7yQ8WA/M5JnFoESKWgadvbgvXCiX4N0G0Nokcj3zV9XxTh edlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=icqivLWZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80365-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80365-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k14-20020a6568ce000000b005d3adb65694si2759952pgt.757.2024.02.25.16.34.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 16:34:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80365-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=icqivLWZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80365-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80365-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 11883281919 for ; Mon, 26 Feb 2024 00:34:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46C2DEAC0; Mon, 26 Feb 2024 00:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="icqivLWZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6AEC0DDBE; Mon, 26 Feb 2024 00:34:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708907658; cv=none; b=gBzTQ+KnTXSpvT5xVhRJ7hfUsBA55KWuxWP/dNYIU/UR3VWBXm65tYfJFSSB8z71oOvPNScypFQEJa6cW7UMf2dQLuWgpILl4AwmckTWVUnVrRVDfL/IIh4QHQ7pyI+eGeaqWWz30cjgYcYa2xWMwECL7l3QESmGt6zxIXvou5I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708907658; c=relaxed/simple; bh=ttzOyxwp5HttIsI7+ixES73I7rKS2i2CvFelCKZ5srI=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=QcLAAVfHrrt4/BGDBszlXdjMoip6FvRlVaDjhIneTe47bguQpUbofRyO2ELAh+OJHH1I+kGfrzGuWB8bdy0FVC0wDkJ0/an+kA+geWPJwElCXeWFtJ/C7WcLcylWsMs/IuzvTjDi+zs11uPfaP/OPEZRPcsR/Wa43ZQO1RaIXFE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=icqivLWZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 825F5C433C7; Mon, 26 Feb 2024 00:34:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708907657; bh=ttzOyxwp5HttIsI7+ixES73I7rKS2i2CvFelCKZ5srI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=icqivLWZoOIWcx3YpYKFRb21c/WlzzHzoecOx2qSqmbh8S8Q1lQSc5i5/7E+s6zIQ q96li2GvvSNockxnelAB8veZVCKQKhWdCdtSYWIs5ga3kKML40ItzewApIO79WZU4Y UjLM1XT0K6Lwm6x6wOz51bvW43SMeNJiDR2AA36d9amQqxu9Lo7N5sZse/aSFWFBIB vnkIWvXJrFRZiA/IUNb6QrTY0G5I40Il+aUcD8/MdYJ4K2DpsyoWl/dvT2S0OvRR14 WeqKh4UMUdRYY03/MnKTMZHmYNvDPcpKz/FbIoqgKH+yCZzDpicNIdLKvJ4ZNtfko3 JuzTVu+ButvrA== Date: Mon, 26 Feb 2024 09:34:14 +0900 From: Masami Hiramatsu (Google) To: Steven Rostedt Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mathieu Desnoyers Subject: Re: [PATCH] tracing: Remove second parameter to __assign_rel_str() Message-Id: <20240226093414.0ff0276080d61be9d4b68a73@kernel.org> In-Reply-To: <20240223162519.2beb8112@gandalf.local.home> References: <20240223162519.2beb8112@gandalf.local.home> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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 On Fri, 23 Feb 2024 16:25:19 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The second parameter of __assign_rel_str() is no longer used. It can be removed. > > Note, the only real users of rel_string is user events. This code is just > in the sample code for testing purposes. > > This makes __assign_rel_str() different than __assign_str() but that's > fine. __assign_str() is used over 700 places and has a larger impact. That > change will come later. Looks good to me. Reviewed-by: Masami Hiramatsu (Google) Thanks, > > Signed-off-by: Steven Rostedt (Google) > --- > include/trace/stages/stage6_event_callback.h | 2 +- > samples/trace_events/trace-events-sample.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/trace/stages/stage6_event_callback.h b/include/trace/stages/stage6_event_callback.h > index 935608971899..a0c15f67eabe 100644 > --- a/include/trace/stages/stage6_event_callback.h > +++ b/include/trace/stages/stage6_event_callback.h > @@ -91,7 +91,7 @@ > #define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1) > > #undef __assign_rel_str > -#define __assign_rel_str(dst, src) \ > +#define __assign_rel_str(dst) \ > do { \ > char *__str__ = __get_rel_str(dst); \ > int __len__ = __get_rel_dynamic_array_len(dst) - 1; \ > diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h > index 2dfaf7fc7bfa..500981eca74d 100644 > --- a/samples/trace_events/trace-events-sample.h > +++ b/samples/trace_events/trace-events-sample.h > @@ -574,7 +574,7 @@ TRACE_EVENT(foo_rel_loc, > ), > > TP_fast_assign( > - __assign_rel_str(foo, foo); > + __assign_rel_str(foo); > __entry->bar = bar; > __assign_rel_bitmask(bitmask, mask, > BITS_PER_BYTE * sizeof(unsigned long)); > -- > 2.43.0 > -- Masami Hiramatsu (Google)