All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: <linux-trace-devel@vger.kernel.org>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Subject: [PATCH 2/2] tracefs: Rename tracefs_hist_reset_sort_key() tracefs_hist_set_sort_key()
Date: Wed, 10 Nov 2021 18:10:25 -0500	[thread overview]
Message-ID: <20211110231025.1131051-3-rostedt@goodmis.org> (raw)
In-Reply-To: <20211110231025.1131051-1-rostedt@goodmis.org>

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The commit log that added tracefs_hist_reset_sort_key() called it
tracefs_hist_set_sort_key(), and that seems to be a better name.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Documentation/libtracefs-hist.txt | 8 ++++----
 include/tracefs.h                 | 4 ++--
 src/tracefs-hist.c                | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Documentation/libtracefs-hist.txt b/Documentation/libtracefs-hist.txt
index cc82286..cc6b859 100644
--- a/Documentation/libtracefs-hist.txt
+++ b/Documentation/libtracefs-hist.txt
@@ -4,7 +4,7 @@ libtracefs(3)
 NAME
 ----
 tracefs_hist_alloc, tracefs_hist_free, tracefs_hist_add_key, tracefs_hist_add_value, tracefs_hist_add_name, tracefs_hist_start,
-tracefs_hist_destory, tracefs_hist_add_sort_key, tracefs_hist_reset_sort_key,tracefs_hist_sort_key_direction - Create and update event histograms
+tracefs_hist_destory, tracefs_hist_add_sort_key, tracefs_hist_set_sort_key,tracefs_hist_sort_key_direction - Create and update event histograms
 
 SYNOPSIS
 --------
@@ -28,8 +28,8 @@ int tracefs_hist_add_key(struct tracefs_hist pass:[*]hist, const char pass:[*]ke
 int tracefs_hist_add_value(struct tracefs_hist pass:[*]hist, const char pass:[*]value);
 int tracefs_hist_add_sort_key(struct tracefs_hist pass:[*]hist,
 			      const char pass:[*]sort_key);
-int tracefs_hist_reset_sort_key(struct tracefs_hist pass:[*]hist,
-			        const char pass:[*]sort_key, ...);
+int tracefs_hist_set_sort_key(struct tracefs_hist pass:[*]hist,
+			      const char pass:[*]sort_key, ...);
 int tracefs_hist_sort_key_direction(struct tracefs_hist pass:[*]hist,
 				    const char pass:[*]sort_key,
 				    enum tracefs_hist_sort_direction dir);
@@ -104,7 +104,7 @@ that must match either an already defined key of the histogram, or an already
 defined value. If _hist_  already has sorting keys (previously added) the new
 _sort_key_ will have lower priority(be secondary or so on) when sorting.
 
-*tracefs_hist_reset_sort_key*() will reset the list of key to sort on. The _hist_ is
+*tracefs_hist_set_sort_key*() will reset the list of key to sort on. The _hist_ is
 the histrogram descriptor to reset the sort key to. The _sort_key_ is a string
 that must match either an already defined key of the histogram, or an already
 defined value. Multiple sort keys may be added to denote a secondary, sort order
diff --git a/include/tracefs.h b/include/tracefs.h
index ebe83fe..32420eb 100644
--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -337,8 +337,8 @@ int tracefs_hist_add_key(struct tracefs_hist *hist, const char *key,
 int tracefs_hist_add_value(struct tracefs_hist *hist, const char *value);
 int tracefs_hist_add_sort_key(struct tracefs_hist *hist,
 			      const char *sort_key);
-int tracefs_hist_reset_sort_key(struct tracefs_hist *hist,
-				const char *sort_key, ...);
+int tracefs_hist_set_sort_key(struct tracefs_hist *hist,
+			      const char *sort_key, ...);
 int tracefs_hist_sort_key_direction(struct tracefs_hist *hist,
 				    const char *sort_key,
 				    enum tracefs_hist_sort_direction dir);
diff --git a/src/tracefs-hist.c b/src/tracefs-hist.c
index 27bab00..7745bca 100644
--- a/src/tracefs-hist.c
+++ b/src/tracefs-hist.c
@@ -477,7 +477,7 @@ int tracefs_hist_add_sort_key(struct tracefs_hist *hist,
 }
 
 /**
- * tracefs_hist_reset_sort_key - set a key for sorting the histogram
+ * tracefs_hist_set_sort_key - set a key for sorting the histogram
  * @hist: The histogram to set the sort key to
  * @sort_key: The key to sort (and the strings after it)
  *  Last one must be NULL.
@@ -487,8 +487,8 @@ int tracefs_hist_add_sort_key(struct tracefs_hist *hist,
  *
  * Returns 0 on success, -1 on error.
  */
-int tracefs_hist_reset_sort_key(struct tracefs_hist *hist,
-				const char *sort_key, ...)
+int tracefs_hist_set_sort_key(struct tracefs_hist *hist,
+			      const char *sort_key, ...)
 {
 	char **list = NULL;
 	char **tmp;
-- 
2.31.1


      parent reply	other threads:[~2021-11-10 23:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 23:10 [PATCH 0/2] tracefs: Make minor updates to histograms Steven Rostedt
2021-11-10 23:10 ` [PATCH 1/2] tracefs Documentation: Fix tracefs_hist_add_sort_key() example Steven Rostedt
2021-11-10 23:10 ` Steven Rostedt [this message]

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=20211110231025.1131051-3-rostedt@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.