summaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-11-20 17:11:42 +0200
committerKees Cook <keescook@chromium.org>2023-12-01 09:51:43 -0800
commit12cd3cd8c797e07afcc47bc4afa760e4ec75e9d7 (patch)
tree23acdb1bd8c2fdfa3038f6465d17a06168979926 /kernel/params.c
parentaabf7c37dfbce3e5fe24f0c86a34bc8f2f63cee8 (diff)
downloadlinux-12cd3cd8c797e07afcc47bc4afa760e4ec75e9d7.tar.gz
linux-12cd3cd8c797e07afcc47bc4afa760e4ec75e9d7.tar.bz2
linux-12cd3cd8c797e07afcc47bc4afa760e4ec75e9d7.zip
params: Introduce the param_unknown_fn type
Introduce a new type for the callback to parse an unknown argument. This unifies function prototypes which takes that as a parameter. Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231120151419.1661807-2-andriy.shevchenko@linux.intel.com Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'kernel/params.c')
-rw-r--r--kernel/params.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 2d4a0564697e..626fa8265932 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -120,9 +120,7 @@ static int parse_one(char *param,
unsigned num_params,
s16 min_level,
s16 max_level,
- void *arg,
- int (*handle_unknown)(char *param, char *val,
- const char *doing, void *arg))
+ void *arg, parse_unknown_fn handle_unknown)
{
unsigned int i;
int err;
@@ -165,9 +163,7 @@ char *parse_args(const char *doing,
unsigned num,
s16 min_level,
s16 max_level,
- void *arg,
- int (*unknown)(char *param, char *val,
- const char *doing, void *arg))
+ void *arg, parse_unknown_fn unknown)
{
char *param, *val, *err = NULL;