diff mbox series

[2/2] tracefs: Rename tracefs_hist_reset_sort_key() tracefs_hist_set_sort_key()

Message ID 20211110231025.1131051-3-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit d8811b70869ca9cd9836757d56263cc9e80f11b7
Headers show
Series tracefs: Make minor updates to histograms | expand

Commit Message

Steven Rostedt Nov. 10, 2021, 11:10 p.m. UTC
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 mbox series

Patch

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;