[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250701151114.OJQTlRCY@linutronix.de>
Date: Tue, 1 Jul 2025 17:11:14 +0200
From: Nam Cao <namcao@...utronix.de>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Gabriele Monaco <gmonaco@...hat.com>,
linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
john.ogness@...utronix.de
Subject: Re: [PATCH v10 17/19] rv: Add rtapp_sleep monitor
On Tue, Jul 01, 2025 at 11:05:51AM -0400, Steven Rostedt wrote:
> On Tue, 1 Jul 2025 11:02:18 -0400
> Steven Rostedt <rostedt@...dmis.org> wrote:
>
> > On Tue, 1 Jul 2025 07:17:57 +0200
> > Nam Cao <namcao@...utronix.de> wrote:
> >
> > > > > + switch (state) {
> > > > > + case S0:
> > > > > + if (val3)
> > > > > + __set_bit(S0, next);
> > > > > + if (val11 && val13)
> > > > > + __set_bit(S1, next);
> > > > > + if (val11 && val14)
> > > > > + __set_bit(S4, next);
> > > > > + if (val5)
> > > > > + __set_bit(S5, next);
> > > > > + break;
> > > >
> > > > What's with all the magic numbers?
> > > >
> > > > Can we turn these into enums so they have some meaning for us humans?
> > >
> > > I'm not sure what you mean, we can't use enums as variables.
> >
> > Bah, never mind. My eyes are getting bad and I need to increase my font
> > size, as all the S0, S1, S2 looked to me like 50, 51, 52, and I was
> > wondering what are all these numbers in the fifties??? :-p
Oh..
> Even with my bad eyesight, these state transitions are generated from
> scripts? If so, can they inject comments that state why they generated
> this?
>
> There's nothing in the code that even states that this was generated
> (if they were).
Yeah this entire file is generated from the LTL specification. I will add a
comment.
Nam
Powered by blists - more mailing lists