[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250716093442.SSIxaNpr@linutronix.de>
Date: Wed, 16 Jul 2025 11:34:42 +0200
From: Nam Cao <namcao@...utronix.de>
To: Gabriele Monaco <gmonaco@...hat.com>
Cc: linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
linux-trace-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Tomas Glozar <tglozar@...hat.com>, Juri Lelli <jlelli@...hat.com>,
Clark Williams <williams@...hat.com>,
John Kacur <jkacur@...hat.com>
Subject: Re: [PATCH v3 09/17] tools/dot2c: Fix generated files going over 100
column limit
On Wed, Jul 16, 2025 at 11:27:54AM +0200, Gabriele Monaco wrote:
> On Tue, 2025-07-15 at 17:01 +0200, Nam Cao wrote:
> > On Tue, Jul 15, 2025 at 09:14:26AM +0200, Gabriele Monaco wrote:
> > > From: Nam Cao <namcao@...utronix.de>
> > > - strformat = self.__get_state_string_length()
> > > -
> > > + maxlen = self.__get_max_strlen_of_states() +
> > > len(self.enum_suffix)
> > > + # account for tabs and spaces/punctuation for each event
> > > + linetoolong = 16 + (maxlen + 3) * nr_events >=
> > > self.line_length
> >
> > I managed to figure out 16 is the indentation. But I failed to
> > understand
> > where is this '3' from.
> >
> > Can you please add some comments for these magic numbers? Or better,
> > assign
> > them to variables with self-explanatory names.
>
> Turns out it was wrong ;)
> I'll fix it and make it clear.
Hah! Got you.
I'm guessing that it was supposed to be 2. I wait for the reveal in v4.
Nam
Powered by blists - more mailing lists