[PATCH v2 2/3] module: Clean up parse_args() arguments

From: Petr Pavlu

Date: Fri Mar 13 2026 - 09:53:08 EST


* Use the preferred `unsigned int` over plain `unsigned` for the `num`
parameter.
* Synchronize the parameter names in moduleparam.h with the ones used by
the implementation in params.c.

Signed-off-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
---
include/linux/moduleparam.h | 8 ++++----
kernel/params.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 8667f72503d9..604bc6e9f3a1 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -417,12 +417,12 @@ extern bool parameqn(const char *name1, const char *name2, size_t n);
typedef int (*parse_unknown_fn)(char *param, char *val, const char *doing, void *arg);

/* Called on module insert or kernel boot */
-extern char *parse_args(const char *name,
+extern char *parse_args(const char *doing,
char *args,
const struct kernel_param *params,
- unsigned num,
- s16 level_min,
- s16 level_max,
+ unsigned int num,
+ s16 min_level,
+ s16 max_level,
void *arg, parse_unknown_fn unknown);

/* Called by module remove. */
diff --git a/kernel/params.c b/kernel/params.c
index c6a354d54213..74d620bc2521 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -161,7 +161,7 @@ static int parse_one(char *param,
char *parse_args(const char *doing,
char *args,
const struct kernel_param *params,
- unsigned num,
+ unsigned int num,
s16 min_level,
s16 max_level,
void *arg, parse_unknown_fn unknown)
--
2.53.0