rv/dot2c: Make automaton definition static
Subsystems (2)
PATCH 1/2 rv/dot2c: Make automaton definition static
Monitor's automata definition is only used locally, so make dot2c generate a static definition.
--- tools/verification/dot2/dot2c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/verification/dot2/dot2c.py +1 -1
@@ -111,7 +111,7 @@ class Dot2c(Automata): def format_aut_init_header(self): buff = [] - buff.append("struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) + buff.append("static struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) return buff def __get_string_vector_per_line_content(self, buff):
Signature · 1 line
2.35.1
PATCH 2/2 rv/monitors: Make monitor's automata definition static
Monitor's automata definition is only used locally, so make them static for all existing monitors.
--- kernel/trace/rv/monitors/wip/wip.h | 2 +- kernel/trace/rv/monitors/wwnr/wwnr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/trace/rv/monitors/wip/wip.h +1 -1
@@ -27,7 +27,7 @@ struct automaton_wip {bool final_states[state_max_wip]; }; -struct automaton_wip automaton_wip = { +static struct automaton_wip automaton_wip = { .state_names = {"preemptive" ,"non_preemptive"
kernel/trace/rv/monitors/wwnr/wwnr.h +1 -1
@@ -27,7 +27,7 @@ struct automaton_wwnr {bool final_states[state_max_wwnr]; }; -struct automaton_wwnr automaton_wwnr = { +static struct automaton_wwnr automaton_wwnr = { .state_names = {"not_running" ,"running"
Signature · 1 line
2.35.1
Steven Rostedt
maintainerQuoted 6 lines · On Tue, 23 Aug 2022 17:20:28 +0200 Daniel Bristot de Oliveira…
Monitor's automata definition is only used locally, so make dot2c generate a static definition.
Somehow this fell through the cracks.
Daniel, is there any reason I shouldn't pull this in now?
-- Steve
Quoted 21 lines
Cc Steven Rostedt <[email protected]>Fixes e3c9fc78f096 ("tools/rv: Add dot2c")Reported-by kernel test robot <[email protected]>Signed-off-by Daniel Bristot de Oliveira <[email protected]>--- tools/verification/dot2/dot2c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/verification/dot2/dot2c.py +1
-1@@ -111,7 +111,7 @@ class Dot2c(Automata): def format_aut_init_header(self): buff = [] - buff.append("struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) + buff.append("static struct %s %s = {" % (self.struct_automaton_def, self.var_automaton_def)) return buff def __get_string_vector_per_line_content(self, buff):
Steven Rostedt
maintainerQuoted 6 lines · On Tue, 18 Oct 2022 18:25:53 -0400 Steven Rostedt <[email protected]> wrote:
Quoted 3 lines · On Tue, 23 Aug 2022 17:20:28 +0200 Daniel Bristot de Oliveira…
Monitor's automata definition is only used locally, so make dot2c generate a static definition.
Quoted 7 lines
Quoted 3 lines
Somehow this fell through the cracks.
Daniel, is there any reason I shouldn't pull this in now?
I think when I applied:
I mistook that to be a new version of this patch.
-- Steve
Quoted 6 lines · Steven Rostedt
Quoted 3 lines · On Tue, 23 Aug 2022 17:20:28 +0200 Daniel Bristot de Oliveira…
Monitor's automata definition is only used locally, so make dot2c generate a static definition.
Quoted 6 lines
Quoted 3 lines
Somehow this fell through the cracks.
Daniel, is there any reason I shouldn't pull this in now?
Oops... yes, it can be pulled.
-- Daniel
Steven Rostedt
maintainerQuoted 7 lines · On Wed, 19 Oct 2022 15:15:54 +0200 Daniel Bristot de Oliveira…
Quoted 6 lines · Steven Rostedt
Quoted 3 lines · On Tue, 23 Aug 2022 17:20:28 +0200 Daniel Bristot de Oliveira…
Monitor's automata definition is only used locally, so make dot2c generate a static definition.
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Somehow this fell through the cracks.
Daniel, is there any reason I shouldn't pull this in now?
Oops... yes, it can be pulled.
OK, I'm going to push this up as tools/urgent and send a pull request to Linus.
-- Steve