[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250502183720.15a82e29@kernel.org>
Date: Fri, 2 May 2025 18:37:20 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, saeedm@...dia.com, horms@...nel.org,
donald.hunter@...il.com
Subject: Re: [PATCH net-next 1/5] tools: ynl-gen: extend block_start/end by
noind arg
On Fri, 2 May 2025 13:38:17 +0200 Jiri Pirko wrote:
> - def block_start(self, line=''):
> + def block_start(self, line='', noind=False):
> if line:
> line = line + ' '
> self.p(line + '{')
> - self._ind += 1
> + if not noind:
> + self._ind += 1
>
> - def block_end(self, line=''):
> + def block_end(self, line='', noind=False):
> if line and line[0] not in {';', ','}:
> line = ' ' + line
> - self._ind -= 1
> + if not noind:
> + self._ind -= 1
Should not be necessary, CodeWriter already automatically "unindents"
lines which end with : as all switch cases should.
Powered by blists - more mailing lists