aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module/main.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-06-13 08:02:01 +0200
committerLuis Chamberlain <mcgrof@kernel.org>2022-07-11 10:49:14 -0700
commitecc726f1458e7aa50e120ff334f0a3be5cccd94c (patch)
tree404c2152837cfe5510664db6c77430bb2b5bca0f /kernel/module/main.c
parentmodule: Add support for default value for module async_probe (diff)
downloadlinux-dev-ecc726f1458e7aa50e120ff334f0a3be5cccd94c.tar.xz
linux-dev-ecc726f1458e7aa50e120ff334f0a3be5cccd94c.zip
module: Fix ERRORs reported by checkpatch.pl
Checkpatch reports following errors: ERROR: do not use assignment in if condition + if ((colon = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) { ERROR: do not use assignment in if condition + if ((mod = find_module_all(name, colon - name, false)) != NULL) ERROR: do not use assignment in if condition + if ((ret = find_kallsyms_symbol_value(mod, name)) != 0) ERROR: do not initialise globals to 0 +int modules_disabled = 0; Fix them. The following one has to remain, because the condition has to be evaluated multiple times by the macro wait_event_interruptible_timeout(). ERROR: do not use assignment in if condition + if (wait_event_interruptible_timeout(module_wq, Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/main.c')
-rw-r--r--kernel/module/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 07dd9c293ab9..b2de00e09abc 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -119,7 +119,7 @@ static void mod_update_bounds(struct module *mod)
}
/* Block module loading/unloading? */
-int modules_disabled = 0;
+int modules_disabled;
core_param(nomodule, modules_disabled, bint, 0);
/* Waiting for a module to finish initializing? */