From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jeremy Linton <jeremy.linton@arm.com>
Subject: [for-next][PATCH 09/12] tracing: Rename enum_replace to eval_replace
Date: Thu, 15 Jun 2017 06:52:32 -0400 [thread overview]
Message-ID: <20170615105254.004426284@goodmis.org> (raw)
In-Reply-To: 20170615105223.551999981@goodmis.org
[-- Attachment #1: 0009-tracing-Rename-enum_replace-to-eval_replace.patch --]
[-- Type: text/plain, Size: 1978 bytes --]
From: Jeremy Linton <jeremy.linton@arm.com>
The enum_replace stanza works as is for sizeof()
calls as well as enums. Rename it as well.
Link: http://lkml.kernel.org/r/20170531215653.3240-9-jeremy.linton@arm.com
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/trace_events.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index e6897b005947..83dfd0dbbbfe 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -2067,12 +2067,12 @@ __register_event(struct trace_event_call *call, struct module *mod)
return 0;
}
-static char *enum_replace(char *ptr, struct trace_eval_map *map, int len)
+static char *eval_replace(char *ptr, struct trace_eval_map *map, int len)
{
int rlen;
int elen;
- /* Find the length of the enum value as a string */
+ /* Find the length of the eval value as a string */
elen = snprintf(ptr, 0, "%ld", map->eval_value);
/* Make sure there's enough room to replace the string with the value */
if (len < elen)
@@ -2127,14 +2127,14 @@ static void update_event_printk(struct trace_event_call *call,
if (isalpha(*ptr) || *ptr == '_') {
if (strncmp(map->eval_string, ptr, len) == 0 &&
!isalnum(ptr[len]) && ptr[len] != '_') {
- ptr = enum_replace(ptr, map, len);
- /* Hmm, enum string smaller than value */
+ ptr = eval_replace(ptr, map, len);
+ /* enum/sizeof string smaller than value */
if (WARN_ON_ONCE(!ptr))
return;
/*
- * No need to decrement here, as enum_replace()
+ * No need to decrement here, as eval_replace()
* returns the pointer to the character passed
- * the enum, and two enums can not be placed
+ * the eval, and two evals can not be placed
* back to back without something in between.
* We can skip that something in between.
*/
--
2.10.2
next prev parent reply other threads:[~2017-06-15 10:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 10:52 [for-next][PATCH 00/12] tracing: Updates for 4.13 Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 01/12] tracing: Remove unused declaration of trace_stop_cmdline_recording Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 02/12] trace: rename kernel enum section to eval Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 03/12] trace: rename trace_enum_map to trace_eval_map Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 04/12] trace: rename struct module entry for trace enums Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 05/12] trace: rename trace enum data structures in trace.c Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 06/12] trace: rename trace_enum_mutex to trace_eval_mutex Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 07/12] trace: rename trace.c enum functions Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 08/12] trace: rename enum_map functions Steven Rostedt
2017-06-15 10:52 ` Steven Rostedt [this message]
2017-06-15 10:52 ` [for-next][PATCH 10/12] tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeofs to their values Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 11/12] tracing: Add TRACE_DEFINE_SIZEOF() macros Steven Rostedt
2017-06-15 10:52 ` [for-next][PATCH 12/12] tracing: Rename update the enum_map file Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170615105254.004426284@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=jeremy.linton@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox