[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87o6sjb4xv.fsf@trenco.lwn.net>
Date: Wed, 13 Aug 2025 09:46:04 -0600
From: Jonathan Corbet <corbet@....net>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, Akira Yokosawa
<akiyks@...il.com>
Subject: Re: [PATCH 3/7] docs: kdoc: clean up the create_parameter_list()
"first arg" logic
Mauro Carvalho Chehab <mchehab+huawei@...nel.org> writes:
>> + #
>> + # args[0] has a string of "type a". If "a" includes an [array]
>> + # declaration, we want to not be fooled by any white space inside
>> + # the brackets, so detect and handle that case specially.
>> + #
>> + r = KernRe(r'^([^[\]]*\s+)' r'((?:.*?\[.*\].*)|(?:.*?))$')
>
> Same comment as patch 6/7... concats in the middle of the like IMO makes it
> harder to read. Better to place them on separate lines:
>
> r = KernRe(r'^([^[\]]*\s+)'
> r'((?:.*?\[.*\].*)|(?:.*?))$')
So I went to do this, and realized that the second chunk of the regex is
really just a complex way of saying "(.*)$" - so I'll make it just that,
at which point splitting up the string seems a bit excessive.
Thanks,
jon
Powered by blists - more mailing lists