Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2293409pxu; Fri, 9 Oct 2020 12:52:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVDTYhf+JuLsmw6NflLgMYZ7mL6j7HSvkbJwAJuymfW9p86MQlmWV3p/4PHJIdjgAMQc++ X-Received: by 2002:a50:eb0a:: with SMTP id y10mr926176edp.89.1602273144761; Fri, 09 Oct 2020 12:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602273144; cv=none; d=google.com; s=arc-20160816; b=xd8s/RNwyvC3QxwLcAf7B3/AZXj10RxaIrjXNXKmXlIpBRE4H4vmTRo5jEojh5ue7C 11SIC8GaEBbZ32IEttbDSfw/2aUAUadTfJ+/RVwyaH3aJgLXplMCBdkYGLlExt7VBh3H 8mpOvI87CvUGeZKHPyo0A7qnmvXbVy1erhWhMpjXph6CnyZmSyI0SnUoNwKwEyW/smHv S7LkXmCQ9ybTHhvWQiKZ9UYU2dG+h0dNRNxt6hJKxnEBs50xId3HBeunaV6ot/KHToBv 7EBvckcoyQd84Xifmt6k6CDebrwKnAHJfsq/l2nEyAPhaJpLZi1nGRt20MUG3RobhJ5f eTYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8y2G+c+RHx6BG1L5qv4KQ5lNH8bF5ghvkyFj4np/Elo=; b=uf4spX93albOzxwZM8JskPPq5e3Y1tFbUx8eEeFtrBzDyvseQaJvzD25gzl+MnS6cM uBJOXNx73J8CgTo2qY/uUiYDxGlepuNNIhxPqakL7yJ2lCDFozJISEPmAsrKXSShDwS9 dHlaEjxnoFTXDPXcqphDmdW942Nk05l3N8MFOg6wloKsSlB6qTKKsjSSF9fz87I9i7Gw xsqh5g/Y9GJakfCA4b2Vf4uhtC+sAa2x0mAh/iLAJwGp1lJ6KgGsoTJU7fjLwxRgpi+B TiBZ+gSkFBSlH334Ofv+EJ3//13Y3v33JKDAyEAGQxpIPz+Su4XZgODQ9ey2bQOxn/nb bAIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Uz3sPS1R; 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 v25si6737934ejf.560.2020.10.09.12.52.01; Fri, 09 Oct 2020 12:52:24 -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=Uz3sPS1R; 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 S2389238AbgJIPRW (ORCPT + 99 others); Fri, 9 Oct 2020 11:17:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:40776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389124AbgJIPRS (ORCPT ); Fri, 9 Oct 2020 11:17:18 -0400 Received: from localhost.localdomain (c-73-209-127-30.hsd1.il.comcast.net [73.209.127.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0AE38222C4; Fri, 9 Oct 2020 15:17:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602256637; bh=0DB8b6xztquhZ4g/UG/EC5UK288yLJ8G4+xvKgFSVn0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=Uz3sPS1RGh6uIj9JCNVXEDdUhVlJH94p07PL3jQknvO/QkBhS7SVhBf1PpKaHjR73 2DADFwgUdEDc2SpIu9Qzjk30VD+73NAAIA/SiZFrcJ5t2ref80FytgLLo+Y+zhFpfD cE0j6g/jlIICPYUmEiZQ9vbx2GSgeyj+yusoPzy4= From: Tom Zanussi To: rostedt@goodmis.org, axelrasmussen@google.com Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] tracing: Move is_good_name() from trace_probe.h to trace.h Date: Fri, 9 Oct 2020 10:17:08 -0500 Message-Id: <235fe1ca3bac2ab40f069f3e62788fc3ec768fea.1602255803.git.zanussi@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org is_good_name() is useful for other trace infrastructure, such as synthetic events, so make it available via trace.h. 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