linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools:bootconfig:scripts: Put back the comments where they should be
@ 2025-05-21 11:46 Bhaskar Chowdhury
  2025-06-20  0:41 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Bhaskar Chowdhury @ 2025-05-21 11:46 UTC (permalink / raw)
  To: mhiramat, linux-kernel, linux-trace-kernel; +Cc: Bhaskar Chowdhury

Mundane adjustment to the comments, where they should belong.

Does it change the functionality? NO

Does it improve the readability? Probably and that is why.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 tools/bootconfig/scripts/ftrace.sh | 35 ++++++++++++++++++++----------
 1 file changed, 24 insertions(+), 11 deletions(-)

diff --git a/tools/bootconfig/scripts/ftrace.sh b/tools/bootconfig/scripts/ftrace.sh
index 186eed923041..e2a075879db4 100644
--- a/tools/bootconfig/scripts/ftrace.sh
+++ b/tools/bootconfig/scripts/ftrace.sh
@@ -1,23 +1,28 @@
 # SPDX-License-Identifier: GPL-2.0-only

-clear_trace() { # reset trace output
-    echo > trace
+ # reset trace output
+clear_trace() {
+
+	 echo > trace
 }

-disable_tracing() { # stop trace recording
+# stop trace recording
+disable_tracing() {
     echo 0 > tracing_on
 }

-enable_tracing() { # start trace recording
+# start trace recording
+enable_tracing() {
     echo 1 > tracing_on
 }

-reset_tracer() { # reset the current tracer
+# reset the current tracer
+reset_tracer() {
     echo nop > current_tracer
 }

+# remove action triggers first
 reset_trigger_file() {
-    # remove action triggers first
     grep -H ':on[^:]*(' $@ |
     while read line; do
         cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["`
@@ -32,21 +37,25 @@ reset_trigger_file() {
     done
 }

-reset_trigger() { # reset all current setting triggers
+# reset all current setting triggers
+reset_trigger() {
     if [ -d events/synthetic ]; then
         reset_trigger_file events/synthetic/*/trigger
     fi
     reset_trigger_file events/*/*/trigger
 }

-reset_events_filter() { # reset all current setting filters
+# reset all current setting filters
+reset_events_filter() {
     grep -v ^none events/*/*/filter |
     while read line; do
 	echo 0 > `echo $line | cut -f1 -d:`
     done
 }

-reset_ftrace_filter() { # reset all triggers in set_ftrace_filter
+# reset all triggers in set_ftrace_filter
+
+reset_ftrace_filter() {
     if [ ! -f set_ftrace_filter ]; then
       return 0
     fi
@@ -78,17 +87,21 @@ disable_events() {
     echo 0 > events/enable
 }

-clear_synthetic_events() { # reset all current synthetic events
+# reset all current synthetic events
+
+ clear_synthetic_events() {
     grep -v ^# synthetic_events |
     while read line; do
         echo "!$line" >> synthetic_events
     done
 }

-initialize_ftrace() { # Reset ftrace to initial-state
+# Reset ftrace to initial-state
 # As the initial state, ftrace will be set to nop tracer,
 # no events, no triggers, no filters, no function filters,
 # no probes, and tracing on.
+
+initialize_ftrace() {
     disable_tracing
     reset_tracer
     reset_trigger
--
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-20  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 11:46 [PATCH] tools:bootconfig:scripts: Put back the comments where they should be Bhaskar Chowdhury
2025-06-20  0:41 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).