lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250607115914.20e897e2@foz.lan>
Date: Sat, 7 Jun 2025 11:59:14 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Jonathan Corbet <corbet@....net>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/9] docs: kdoc: simplify the PROTO continuation logic

Em Fri,  6 Jun 2025 10:34:30 -0600
Jonathan Corbet <corbet@....net> escreveu:

> Remove the unneeded "cont" variable and tighten up the code slightly.
> 
> Signed-off-by: Jonathan Corbet <corbet@....net>

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

> ---
>  scripts/lib/kdoc/kdoc_parser.py | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
> index 062453eefc7a..b193cf9dc0d1 100644
> --- a/scripts/lib/kdoc/kdoc_parser.py
> +++ b/scripts/lib/kdoc/kdoc_parser.py
> @@ -1680,7 +1680,6 @@ class KernelDoc:
>          Besides parsing kernel-doc tags, it also parses export symbols.
>          """
>  
> -        cont = False
>          prev = ""
>          prev_ln = None
>          export_table = set()
> @@ -1696,18 +1695,14 @@ class KernelDoc:
>                      if self.state == state.PROTO:
>                          if line.endswith("\\"):
>                              prev += line.rstrip("\\")
> -                            cont = True
> -
>                              if not prev_ln:
>                                  prev_ln = ln
> -
>                              continue
>  
> -                        if cont:
> +                        if prev:
>                              ln = prev_ln
>                              line = prev + line
>                              prev = ""
> -                            cont = False
>                              prev_ln = None
>  
>                      self.config.log.debug("%d %s%s: %s",



Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ