[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAS2ZgDeu4SgUco8_hoHaKf5XtnB+bEB7LskCXuOQ3nhXw@mail.gmail.com>
Date: Fri, 7 Feb 2025 17:50:10 +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
Subject: Re: [PATCH -v2 2/7] module/modpost: Use for() loop
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra <peterz@...radead.org> wrote:
Please add a commit description.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> scripts/mod/modpost.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1586,12 +1586,9 @@ 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))
[Bikeshed]
Personally, I tend to indent a long for() as follows:
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 (extra_warn && !get_modinfo(&info, "description"))
> warn("missing MODULE_DESCRIPTION() in %s\n", modname);
>
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists