Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3015461pxu; Sat, 10 Oct 2020 16:11:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu6MGV/6XzhSMtvS43kNwRfnK1L/IFKHzw3hGbwkSYcb874H+UiNh3RCJWz5NwJKTzKhrl X-Received: by 2002:aa7:ca52:: with SMTP id j18mr6286499edt.147.1602371469262; Sat, 10 Oct 2020 16:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602371469; cv=none; d=google.com; s=arc-20160816; b=hAE8uKgE58D0efnWCuuI8RZC8w47VwlvPh1pQO4Tv1GU1Qe8YfzQJyRp2Bn450uhFx lxXzYHJaI3mtm3UWMtwXJThoe+hEwyKQmw3zeV5wh0imj+3upS0TkPxJsAqAoRVw+OdS dvdvNNijNfXnpH448dAI4skbQfasvrbeUH/444Ct4MT3dyUD16iZy1hJ1jVVQdEAvyfT JlZrHLx7/9u+U7+h6dqrB2oRD9tocglAev/ERBhlghyfvZghhGHJ2EvmnNZoG8VwmJPZ v3KdgZ9zpWiYe1aX/EskUZgpwzjITouAg+IKdfobAfXZ3AB4ehR0/d8WE8Mv2NV2EHll 38Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=2W+HbAxsXXvUp9b0kzbaajtS20mlTisyZWmE/e1a3kw=; b=GFans02GgE54K+GRf0YY2DkjMRyPuAOICmkOdepquVmrLzr3jk41LasKIEinuaJ1AB m7gQB8R9nPC/orpCckVA+Ax2kvdpSxCHkQDFFK6sHqJpZFsXevSrOvOFA3lM/ghOnHX2 KPGuU7PyyHS9HizKI7K4986FbhIvE/yCSYzl8ssk/qHewSaWOhrogDutUZpJuuBpOJ5o 10cZLquRgshNArVwDTQ52FFx3O0/HiuSiCEMp7foyg4WQQm8VGmAFc1CqJG+gS430L+c 0yb9GPadzmQ/3iMXkZ6FiGr9m1U26OzCKfFBBQbCB2uWhPovYe4duDw1U3Q6H6Li1YXr p2hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ynh8xWT2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si9142139ejd.39.2020.10.10.16.10.46; Sat, 10 Oct 2020 16:11:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ynh8xWT2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732082AbgJJW7O (ORCPT + 99 others); Sat, 10 Oct 2020 18:59:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:57030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731904AbgJJTyL (ORCPT ); Sat, 10 Oct 2020 15:54:11 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 50376222B8; Sat, 10 Oct 2020 14:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602340744; bh=VKttiuENtiWHH3T6V9S6RmhCbu0RiQwdS2O9eY84YMc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ynh8xWT2d+PyrCHPtPN5G2l9stBhUIS0W7QPOeNDyhFYu/7J5K7Z7wqP6Vjv3c9w7 jPwjmj7ZepWTE7xhdFO7xbl2myPnAh0ofPaTVhOgwSeiKtIl4d24XSGEaC4h/eHBTv 4k1m+wLuen+otB9vGZQopMKO9HHeQPlEob5KzHzE= Date: Sat, 10 Oct 2020 23:39:00 +0900 From: Masami Hiramatsu To: Tom Zanussi Cc: rostedt@goodmis.org, axelrasmussen@google.com, mhiramat@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] tracing: Move is_good_name() from trace_probe.h to trace.h Message-Id: <20201010233900.8a8e0e3c4f2e5e897cfe14ef@kernel.org> In-Reply-To: <235fe1ca3bac2ab40f069f3e62788fc3ec768fea.1602255803.git.zanussi@kernel.org> References: <235fe1ca3bac2ab40f069f3e62788fc3ec768fea.1602255803.git.zanussi@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Oct 2020 10:17:08 -0500 Tom Zanussi wrote: > is_good_name() is useful for other trace infrastructure, such as > synthetic events, so make it available via trace.h. > This looks good to me. Acked-by: Masami Hiramatsu Thanks! > Signed-off-by: Tom Zanussi > --- > kernel/trace/trace.h | 13 +++++++++++++ > kernel/trace/trace_probe.h | 13 ------------- > 2 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h > index 5b0e797cacdd..a94852838491 100644 > --- a/kernel/trace/trace.h > +++ b/kernel/trace/trace.h > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > > #ifdef CONFIG_FTRACE_SYSCALLS > #include /* For NR_SYSCALLS */ > @@ -2090,4 +2091,16 @@ static __always_inline void trace_iterator_reset(struct trace_iterator *iter) > iter->pos = -1; > } > > +/* Check the name is good for event/group/fields */ > +static inline bool is_good_name(const char *name) > +{ > + if (!isalpha(*name) && *name != '_') > + return false; > + while (*++name != '\0') { > + if (!isalpha(*name) && !isdigit(*name) && *name != '_') > + return false; > + } > + return true; > +} > + > #endif /* _LINUX_KERNEL_TRACE_H */ > diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h > index 04d00987da69..2f703a20c724 100644 > --- a/kernel/trace/trace_probe.h > +++ b/kernel/trace/trace_probe.h > @@ -16,7 +16,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -348,18 +347,6 @@ bool trace_probe_match_command_args(struct trace_probe *tp, > #define trace_probe_for_each_link_rcu(pos, tp) \ > list_for_each_entry_rcu(pos, &(tp)->event->files, list) > > -/* Check the name is good for event/group/fields */ > -static inline bool is_good_name(const char *name) > -{ > - if (!isalpha(*name) && *name != '_') > - return false; > - while (*++name != '\0') { > - if (!isalpha(*name) && !isdigit(*name) && *name != '_') > - return false; > - } > - return true; > -} > - > #define TPARG_FL_RETURN BIT(0) > #define TPARG_FL_KERNEL BIT(1) > #define TPARG_FL_FENTRY BIT(2) > -- > 2.17.1 > -- Masami Hiramatsu