Mauro Carvalho Chehab <[email protected]> writes:

> The regular expression currently expects a single word for the
> type, but it may be something like  "struct foo".
>
> Add support for it.
>
> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
> Acked-by: Randy Dunlap <[email protected]>
> Tested-by: Randy Dunlap <[email protected]>
> Reviewed-by: Aleksandr Loktionov <[email protected]>
> ---
>  tools/lib/python/kdoc/kdoc_parser.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/lib/python/kdoc/kdoc_parser.py 
> b/tools/lib/python/kdoc/kdoc_parser.py
> index 39ff27d421eb..22a820d33dc8 100644
> --- a/tools/lib/python/kdoc/kdoc_parser.py
> +++ b/tools/lib/python/kdoc/kdoc_parser.py
> @@ -1018,14 +1018,14 @@ class KernelDoc:
>  
>          default_val = None
>  
> -        r= KernRe(OPTIONAL_VAR_ATTR + 
> r"[\w_]*\s+(?:\*+)?([\w_]+)\s*[\d\]\[]*\s*(=.*)?")
> +        r= KernRe(OPTIONAL_VAR_ATTR + 
> r"\s*[\w_\s]*\s+(?:\*+)?([\w_]+)\s*[\d\]\[]*\s*(=.*)?")

Just for future reference...I *really* think that the code is improved
by breaking up and commenting gnarly regexes like this.  They are really
unreadable in this form.  (And yes, I know the code has been full of
these forever, but we can always try to make it better :)

Anyway, just grumbling.

Thanks,

jon

Reply via email to