[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dck4fhndgfgvue2bho4i3rf5r476hxhnh6pgvahmmevtvrlbrs@iyihhv6vb6ia>
Date: Sun, 4 May 2025 20:25:56 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
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
Sat, May 03, 2025 at 03:37:20AM +0200, kuba@...nel.org wrote:
>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.
Got it. Will try. Thanks!
Powered by blists - more mailing lists