Skip to contentSkip to conversation

ftrace: Tidy up some false kernel-doc markings

PATCH NAK Yang Li 2 participants 3 messages Oct 29, 2021

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/2 ftrace: Tidy up some false kernel-doc markings

Deals with
W=1 warning: This comment starts with '/**', but isn't a kernel-doc comment.
W=1 warning: bad line.

---
 kernel/trace/ftrace.c            | 18 +++++++++---------
 kernel/trace/trace_events_hist.c |  4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)
kernel/trace/ftrace.c +9 -9
index feb1ea9..679db91 100644
@@ -2203,7 +2203,7 @@ static int ftrace_check_record(struct dyn_ftrace *rec, bool enable, bool update)
 	return FTRACE_UPDATE_MAKE_NOP;
 }
 
-/**
+/*
  * ftrace_update_record, set a record that now is tracing or not
  * @rec: the record to update
  * @enable: set to true if the record is tracing, false to force disable
@@ -2216,7 +2216,7 @@ int ftrace_update_record(struct dyn_ftrace *rec, bool enable)
 	return ftrace_check_record(rec, enable, true);
 }
 
-/**
+/*
  * ftrace_test_record, check if the record has been enabled or not
  * @rec: the record to test
  * @enable: set to true to check if enabled, false if it is disabled
@@ -2602,7 +2602,7 @@ struct ftrace_rec_iter {
 	int			index;
 };
 
-/**
+/*
  * ftrace_rec_iter_start, start up iterating over traced functions
  *
  * Returns an iterator handle that is used to iterate over all
@@ -2633,7 +2633,7 @@ struct ftrace_rec_iter *ftrace_rec_iter_start(void)
 	return iter;
 }
 
-/**
+/*
  * ftrace_rec_iter_next, get the next record to process.
  * @iter: The handle to the iterator.
  *
@@ -2658,7 +2658,7 @@ struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter)
 	return iter;
 }
 
-/**
+/*
  * ftrace_rec_iter_record, get the record at the iterator location
  * @iter: The current iterator location
  *
@@ -2761,7 +2761,7 @@ static int __ftrace_modify_code(void *data)
 	return 0;
 }
 
-/**
+/*
  * ftrace_run_stop_machine, go back to the stop machine method
  * @command: The command to tell ftrace what to do
  *
@@ -2773,7 +2773,7 @@ void ftrace_run_stop_machine(int command)
 	stop_machine(__ftrace_modify_code, &command, NULL);
 }
 
-/**
+/*
  * arch_ftrace_update_code, modify the code to trace or not trace
  * @command: The command that needs to be done
  *
@@ -7742,7 +7742,7 @@ void ftrace_kill(void)
 	ftrace_trace_function = ftrace_stub;
 }
 
-/**
+/*
  * Test if ftrace is dead or not.
  */
 int ftrace_is_dead(void)
@@ -7750,7 +7750,7 @@ int ftrace_is_dead(void)
 	return ftrace_disabled;
 }
 
-/**
+/*
  * register_ftrace_function - register a function for profiling
  * @ops - ops structure that holds the function for profiling.
  *
kernel/trace/trace_events_hist.c +2 -2
index cddf6bf..aa93e87 100644
@@ -836,7 +836,7 @@ static struct hist_field *find_any_var_ref(struct hist_trigger_data *hist_data,
  * A trigger can define one or more variables.  If any one of them is
  * currently referenced by any other trigger, this function will
  * determine that.
-
+ *
  * Typically used to determine whether or not a trigger can be removed
  * - if there are any references to a trigger's variables, it cannot.
  *
@@ -3050,7 +3050,7 @@ static struct field_var *create_field_var(struct hist_trigger_data *hist_data,
  * events.  However, for convenience, users are allowed to directly
  * specify an event field in an action, which will be automatically
  * converted into a variable on their behalf.
-
+ *
  * This function creates a field variable with the name var_name on
  * the hist trigger currently being defined on the target event.  If
  * subsys_name and event_name are specified, this function simply
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH 2/2 ftrace: remove unneeded semicolon

Eliminate the following coccicheck warning:
./kernel/trace/trace_events_hist.c:6087:2-3: Unneeded semicolon

---
 kernel/trace/trace_events_hist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace_events_hist.c +1 -1
index aa93e87..2012d4e 100644
@@ -6084,7 +6084,7 @@ static int event_hist_trigger_func(struct event_command *cmd_ops,
 	while (start) {
 		*(start + 4) = 'X';
 		start = strstr(start + 11, ".sym-offset");
-	};
+	}
 
 	attrs = parse_hist_trigger_attrs(file->tr, trigger);
 	if (IS_ERR(attrs))
Signature · 1 line
1.8.3.1
maintainer NAK
#2 lore raw
In reply to Yang Li
Quoted 6 lines · On Fri, 29 Oct 2021 14:38:42 +0800 Yang Li <[email protected]> wrote:

Deals with
W=1 warning: This comment starts with '/**', but isn't a kernel-doc comment.
W=1 warning: bad line.

But are you a robot?

NACK!

-- Steve

Quoted 113 lines
---
 kernel/trace/ftrace.c            | 18 +++++++++---------
 kernel/trace/trace_events_hist.c |  4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)
kernel/trace/ftrace.c +9 -9
index feb1ea9..679db91 100644
@@ -2203,7 +2203,7 @@ static int ftrace_check_record(struct dyn_ftrace *rec, bool enable, bool update)
 	return FTRACE_UPDATE_MAKE_NOP;
 }
 
-/**
+/*
  * ftrace_update_record, set a record that now is tracing or not
  * @rec: the record to update
  * @enable: set to true if the record is tracing, false to force disable
@@ -2216,7 +2216,7 @@ int ftrace_update_record(struct dyn_ftrace *rec, bool enable)
 	return ftrace_check_record(rec, enable, true);
 }
 
-/**
+/*
  * ftrace_test_record, check if the record has been enabled or not
  * @rec: the record to test
  * @enable: set to true to check if enabled, false if it is disabled
@@ -2602,7 +2602,7 @@ struct ftrace_rec_iter {
 	int			index;
 };
 
-/**
+/*
  * ftrace_rec_iter_start, start up iterating over traced functions
  *
  * Returns an iterator handle that is used to iterate over all
@@ -2633,7 +2633,7 @@ struct ftrace_rec_iter *ftrace_rec_iter_start(void)
 	return iter;
 }
 
-/**
+/*
  * ftrace_rec_iter_next, get the next record to process.
  * @iter: The handle to the iterator.
  *
@@ -2658,7 +2658,7 @@ struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter)
 	return iter;
 }
 
-/**
+/*
  * ftrace_rec_iter_record, get the record at the iterator location
  * @iter: The current iterator location
  *
@@ -2761,7 +2761,7 @@ static int __ftrace_modify_code(void *data)
 	return 0;
 }
 
-/**
+/*
  * ftrace_run_stop_machine, go back to the stop machine method
  * @command: The command to tell ftrace what to do
  *
@@ -2773,7 +2773,7 @@ void ftrace_run_stop_machine(int command)
 	stop_machine(__ftrace_modify_code, &command, NULL);
 }
 
-/**
+/*
  * arch_ftrace_update_code, modify the code to trace or not trace
  * @command: The command that needs to be done
  *
@@ -7742,7 +7742,7 @@ void ftrace_kill(void)
 	ftrace_trace_function = ftrace_stub;
 }
 
-/**
+/*
  * Test if ftrace is dead or not.
  */
 int ftrace_is_dead(void)
@@ -7750,7 +7750,7 @@ int ftrace_is_dead(void)
 	return ftrace_disabled;
 }
 
-/**
+/*
  * register_ftrace_function - register a function for profiling
  * @ops - ops structure that holds the function for profiling.
  *
kernel/trace/trace_events_hist.c +2 -2
index cddf6bf..aa93e87 100644
@@ -836,7 +836,7 @@ static struct hist_field *find_any_var_ref(struct hist_trigger_data *hist_data,
  * A trigger can define one or more variables.  If any one of them is
  * currently referenced by any other trigger, this function will
  * determine that.
-
+ *
  * Typically used to determine whether or not a trigger can be removed
  * - if there are any references to a trigger's variables, it cannot.
  *
@@ -3050,7 +3050,7 @@ static struct field_var *create_field_var(struct hist_trigger_data *hist_data,
  * events.  However, for convenience, users are allowed to directly
  * specify an event field in an action, which will be automatically
  * converted into a variable on their behalf.
-
+ *
  * This function creates a field variable with the name var_name on
  * the hist trigger currently being defined on the target event.  If
  * subsys_name and event_name are specified, this function simply