projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5806cd
)
modpost: Use for() loop
author
Peter Zijlstra
<peterz@infradead.org>
Fri, 2 May 2025 14:12:05 +0000
(16:12 +0200)
committer
Masahiro Yamada
<masahiroy@kernel.org>
Sun, 25 May 2025 09:00:52 +0000
(18:00 +0900)
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 <peterz@infradead.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/mod/modpost.c
patch
|
blob
|
blame
|
history
diff --git
a/scripts/mod/modpost.c
b/scripts/mod/modpost.c
index be89921d60b61d1db0398313aeb00bc1888843b1..2d1c059bf6cf9c7faac5a8bef49e9b9375f0c98b 100644
(file)
--- a/
scripts/mod/modpost.c
+++ b/
scripts/mod/modpost.c
@@
-1595,12
+1595,10
@@
static void read_symbols(const char *modname)
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);