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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNARCQ6_yWiUCwVLEAeqJ_zN4pw73uLaJ7pWd02dqiSDa4w@mail.gmail.com>
Date: Fri, 9 May 2025 09:47:18 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mcgrof@...nel.org, x86@...nel.org, hpa@...or.com, petr.pavlu@...e.com, 
	samitolvanen@...gle.com, da.gomez@...sung.com, nathan@...nel.org, 
	nicolas@...sle.eu, linux-kernel@...r.kernel.org, 
	linux-modules@...r.kernel.org, linux-kbuild@...r.kernel.org, 
	hch@...radead.org, gregkh@...uxfoundation.org, roypat@...zon.co.uk
Subject: Re: [PATCH v3 1/5] modpost: Use for() loop

On Fri, May 2, 2025 at 11:25 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> Slight cleanup by using a for() loop instead of while(). This makes it
> clearer what is the iteration and what is the actual work done.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  scripts/mod/modpost.c |    8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)

Applied to linux-kbuild.
Thanks.



> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1595,12 +1595,10 @@ static void read_symbols(const char *mod
>                         license = get_next_modinfo(&info, "license", license);
>                 }
>
> -               namespace = get_modinfo(&info, "import_ns");
> -               while (namespace) {
> +               for (namespace = get_modinfo(&info, "import_ns");
> +                    namespace;
> +                    namespace = get_next_modinfo(&info, "import_ns", namespace))
>                         add_namespace(&mod->imported_namespaces, namespace);
> -                       namespace = get_next_modinfo(&info, "import_ns",
> -                                                    namespace);
> -               }
>
>                 if (!get_modinfo(&info, "description"))
>                         warn("missing MODULE_DESCRIPTION() in %s\n", modname);
>
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ