diff mbox series

[1/2] rv/dot2c: Make automaton definition static

Message ID ffbb92010f643307766c9307fd42f416e5b85fa0.1661266564.git.bristot@kernel.org (mailing list archive)
State Accepted
Headers show
Series [1/2] rv/dot2c: Make automaton definition static | expand

Commit Message

Daniel Bristot de Oliveira Aug. 23, 2022, 3:20 p.m. UTC
Monitor's automata definition is only used locally, so make dot2c generate
a static definition.

Link: https://lore.kernel.org/all/202208210332.gtHXje45-lkp@intel.com
Link: https://lore.kernel.org/all/202208210358.6HH3OrVs-lkp@intel.com

Cc: Steven Rostedt <rostedt@goodmis.org>
Fixes: e3c9fc78f096 ("tools/rv: Add dot2c")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
---
 tools/verification/dot2/dot2c.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steven Rostedt Oct. 18, 2022, 10:25 p.m. UTC | #1
On Tue, 23 Aug 2022 17:20:28 +0200
Daniel Bristot de Oliveira <bristot@kernel.org> wrote:

> Monitor's automata definition is only used locally, so make dot2c generate
> a static definition.
> 
> Link: https://lore.kernel.org/all/202208210332.gtHXje45-lkp@intel.com
> Link: https://lore.kernel.org/all/202208210358.6HH3OrVs-lkp@intel.com
> 

Somehow this fell through the cracks.

Daniel, is there any reason I shouldn't pull this in now?

-- Steve

> Cc: Steven Rostedt <rostedt@goodmis.org>
> Fixes: e3c9fc78f096 ("tools/rv: Add dot2c")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
> ---
>  tools/verification/dot2/dot2c.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/verification/dot2/dot2c.py b/tools/verification/dot2/dot2c.py
> index fa73353f7e56..be8a364a469b 100644
> --- a/tools/verification/dot2/dot2c.py
> +++ b/tools/verification/dot2/dot2c.py
> @@ -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 Oct. 18, 2022, 10:28 p.m. UTC | #2
On Tue, 18 Oct 2022 18:25:53 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Tue, 23 Aug 2022 17:20:28 +0200
> Daniel Bristot de Oliveira <bristot@kernel.org> wrote:
> 
> > Monitor's automata definition is only used locally, so make dot2c generate
> > a static definition.
> > 
> > Link: https://lore.kernel.org/all/202208210332.gtHXje45-lkp@intel.com
> > Link: https://lore.kernel.org/all/202208210358.6HH3OrVs-lkp@intel.com
> >   
> 
> Somehow this fell through the cracks.
> 
> Daniel, is there any reason I shouldn't pull this in now?

I think when I applied:

  https://patchwork.kernel.org/project/linux-trace-devel/patch/a50e27c3738d6ef809f4201857229fed64799234.1661266564.git.bristot@kernel.org/

I mistook that to be a new version of this patch.

-- Steve
Daniel Bristot de Oliveira Oct. 19, 2022, 1:15 p.m. UTC | #3
On 10/19/22 00:25, Steven Rostedt wrote:
> On Tue, 23 Aug 2022 17:20:28 +0200
> Daniel Bristot de Oliveira <bristot@kernel.org> wrote:
> 
>> Monitor's automata definition is only used locally, so make dot2c generate
>> a static definition.
>>
>> Link: https://lore.kernel.org/all/202208210332.gtHXje45-lkp@intel.com
>> Link: https://lore.kernel.org/all/202208210358.6HH3OrVs-lkp@intel.com
>>
> 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 Oct. 20, 2022, 8:55 p.m. UTC | #4
On Wed, 19 Oct 2022 15:15:54 +0200
Daniel Bristot de Oliveira <bristot@kernel.org> wrote:

> On 10/19/22 00:25, Steven Rostedt wrote:
> > On Tue, 23 Aug 2022 17:20:28 +0200
> > Daniel Bristot de Oliveira <bristot@kernel.org> wrote:
> >   
> >> Monitor's automata definition is only used locally, so make dot2c generate
> >> a static definition.
> >>
> >> Link: https://lore.kernel.org/all/202208210332.gtHXje45-lkp@intel.com
> >> Link: https://lore.kernel.org/all/202208210358.6HH3OrVs-lkp@intel.com
> >>  
> > 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
diff mbox series

Patch

diff --git a/tools/verification/dot2/dot2c.py b/tools/verification/dot2/dot2c.py
index fa73353f7e56..be8a364a469b 100644
--- a/tools/verification/dot2/dot2c.py
+++ b/tools/verification/dot2/dot2c.py
@@ -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):