Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp104346rbb; Fri, 23 Feb 2024 13:24:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV2v52Je+as9/NF8xFc12XJ1Jkamyl4/kRYVJP7lJEFz8p/UOCWs7ovlk7FbaBnSxPOxEDOqS5232MZ4FJYXnIf2hgDVbxR+ZDEjAkEGw== X-Google-Smtp-Source: AGHT+IFkXaaVHfNUmSC4qZwio9ZqMg0V/lBXf0K+OA0OU/StJ57qoYnUs3v+x5h26qeY9R4ytovJ X-Received: by 2002:a92:c5a8:0:b0:365:1f5d:31c9 with SMTP id r8-20020a92c5a8000000b003651f5d31c9mr1128806ilt.25.1708723461522; Fri, 23 Feb 2024 13:24:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708723461; cv=pass; d=google.com; s=arc-20160816; b=Zu3Rjv+Z9TbWDlwNP0RVAy9quSjd/z2Sar4SmZLnHXy9WeY2xjYeMtldoRfojrbG9y 0veXnTOrj4O2Dnly/Q8vqcRyeqf8fSYubwCQaQYFcitfSw42frT7tT4j6YauA96w4MCa f4rsVO6/oK4OqQ2SBjoXS0qfoDrF/S4syYDfqk8NJi2YxUt9LS1KvubHT6P3y5z/7ii5 1w3lAj/4pk+gxMotDFCtT6uYoB5iNgYUHwGAFYED0z2eVBUTVetrPEq0lsBW2b10RHW0 vuNJxpImuMDUtHmy8e4p7W1eeFq52QFe7pptx5RMOwuX7sumCoZRZu3yppFJCcmaeUTD nK3A== 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:message-id:subject:cc:to:from :date; bh=HDakZXvmhWo4vz/NnFO15n3A39Mhxxboof2vRu5fHEI=; fh=a/W6vY+bgZ8N83j3/Fv0S1qn1lyMv2u/UPVp2x/5R8s=; b=LpgdRDxTENk2aqYhl6D5awrJ3UNaxtfyPubpt7y3RunKbkU4MtJ3KKvO9M/h8/ZHdh 67j1l8DVqsZT2NThbiJdAYzm30qfP1+44uK7xF1rIPwtLeAmROxJ0LRuhTNeetteQNot JXDwCZmpUlw4+KvajqvGR6JhsZIlNKE6g8n7DnTWYMWDJU9/e0hamD7dTSDKOE5wBxfa obPT/2iO81EMQFeZQezap0SGzD9n0GyzKOcBocXQQhxcdk+V0NdBtzmD5HrXKhp3QjpT EGWkvrL9g4cZYQ+w9VV9rXUAxRf+mPM3MkHw/xuxkS/7liKI/7dAJ7uAxBUcrioit2BY dOJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-79205-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79205-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 t29-20020a63b25d000000b005cf268638edsi13135189pgo.177.2024.02.23.13.24.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 13:24:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79205-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 (google.com: domain of linux-kernel+bounces-79205-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79205-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 3455428BCCF for ; Fri, 23 Feb 2024 21:24:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E28A114AD04; Fri, 23 Feb 2024 21:23:27 +0000 (UTC) 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 684BC1DDC3; Fri, 23 Feb 2024 21:23:27 +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=1708723407; cv=none; b=pkrrxbvCXgmbY/AtmzZDKceFPrWBxnn5z3WUk67LuWBlf/cJPuKNFdCIGjMTFDlZAhklETv866YNe7VaBsR1SCAacRw5vmumlfNXKdYQdRMlH7wz+3uzNPxNwKRp/N1L6BOyHSYIa4RIIqp2dlGwjfGc07+oBi7i3YpdJ7Zl0f8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708723407; c=relaxed/simple; bh=yqTC6CNCGndCwN3XIdjvcwzQ+nsaHPctVb6WPNXyc18=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=Lv8n7EuLSll0K7IITJPWEND5I5lbwL9N0/g7VAzo0rZ0uRkU2ccxaYg3xUdteR30jQ/EErh8HoS8TBEdbM/uV6hO5vx8K5PTpZl653zqTqdcVDNHGv0HEOa34ev58OEwj6fkiAY8HKWNCM7xcLTwKQGIDCubowy8kqYJMp3+lns= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55164C433F1; Fri, 23 Feb 2024 21:23:26 +0000 (UTC) Date: Fri, 23 Feb 2024 16:25:19 -0500 From: Steven Rostedt To: LKML , Linux Trace Kernel Cc: Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH] tracing: Remove second parameter to __assign_rel_str() Message-ID: <20240223162519.2beb8112@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (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 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. 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