From: Petr Pavlu <petr.pavlu@suse.com>
To: Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>
Cc: Christophe Leroy <chleroy@kernel.org>,
Aaron Tomlin <atomlin@atomlin.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] module: Clean up parse_args() arguments
Date: Fri, 13 Mar 2026 14:48:03 +0100 [thread overview]
Message-ID: <20260313134932.335275-3-petr.pavlu@suse.com> (raw)
In-Reply-To: <20260313134932.335275-1-petr.pavlu@suse.com>
* 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@suse.com>
---
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
next prev parent reply other threads:[~2026-03-13 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 13:48 [PATCH v2 0/3] module: Fix freeing of charp module parameters when CONFIG_SYSFS=n Petr Pavlu
2026-03-13 13:48 ` [PATCH v2 1/3] " Petr Pavlu
2026-03-13 13:48 ` Petr Pavlu [this message]
2026-03-13 13:48 ` [PATCH v2 3/3] module: Remove extern keyword from param prototypes Petr Pavlu
2026-03-20 17:45 ` [PATCH v2 0/3] module: Fix freeing of charp module parameters when CONFIG_SYSFS=n Sami Tolvanen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260313134932.335275-3-petr.pavlu@suse.com \
--to=petr.pavlu@suse.com \
--cc=atomlin@atomlin.com \
--cc=chleroy@kernel.org \
--cc=da.gomez@kernel.org \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=samitolvanen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox