[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250701110551.5c2dc2ee@batman.local.home>
Date: Tue, 1 Jul 2025 11:05:51 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Nam Cao <namcao@...utronix.de>
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, 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
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).
-- Steve
Powered by blists - more mailing lists