[PATCH 08/12] docs: kdoc: remove an extraneous strip() call

Jonathan Corbet posted 12 patches 2 months ago
There is a newer version of this series
[PATCH 08/12] docs: kdoc: remove an extraneous strip() call
Posted by Jonathan Corbet 2 months ago
...the variable in question was already strip()ed at the top of the loop.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 scripts/lib/kdoc/kdoc_parser.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
index efc5888fcc74..b751fa8edde7 100644
--- a/scripts/lib/kdoc/kdoc_parser.py
+++ b/scripts/lib/kdoc/kdoc_parser.py
@@ -703,7 +703,6 @@ class KernelDoc:
                                 newmember += f"{dtype}{s_id}.{name}{extra}; "
 
                         else:
-                            arg = arg.strip()
                             # Handle bitmaps
                             arg = KernRe(r':\s*\d+\s*').sub('', arg)
 
-- 
2.50.1
Re: [PATCH 08/12] docs: kdoc: remove an extraneous strip() call
Posted by Mauro Carvalho Chehab 2 months ago
Em Thu, 31 Jul 2025 18:13:22 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:

> ...the variable in question was already strip()ed at the top of the loop.

Good catch. This was probably a left-over from some code changes.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> ---
>  scripts/lib/kdoc/kdoc_parser.py | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
> index efc5888fcc74..b751fa8edde7 100644
> --- a/scripts/lib/kdoc/kdoc_parser.py
> +++ b/scripts/lib/kdoc/kdoc_parser.py
> @@ -703,7 +703,6 @@ class KernelDoc:
>                                  newmember += f"{dtype}{s_id}.{name}{extra}; "
>  
>                          else:
> -                            arg = arg.strip()
>                              # Handle bitmaps
>                              arg = KernRe(r':\s*\d+\s*').sub('', arg)
>  



Thanks,
Mauro