mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
modpost: Use for() loop
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>
This commit is contained in:
parent
a5806cd506
commit
6b91ff002c
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue