On Wed, 3 Feb 2021, Christoph Hellwig wrote:
> FYI, this is the updated version:
>
> ---
> >From 664ca3378deac7530fe8fc15fe73d583ddf2 Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig
> Date: Wed, 20 Jan 2021 14:58:27 +0100
> Subject: module: pass struct find_symbol_args to find_symbol
>
>
FYI, this is the updated version:
---
>From 664ca3378deac7530fe8fc15fe73d583ddf2 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig
Date: Wed, 20 Jan 2021 14:58:27 +0100
Subject: module: pass struct find_symbol_args to find_symbol
Simplify the calling convention by passing the find_symbol_args
> void *__symbol_get(const char *symbol)
> {
> - struct module *owner;
> - const struct kernel_symbol *sym;
> + struct find_symbol_arg fsa = {
> + .name = symbol,
> + .gplok = true,
> + .warn = true,
> + };
>
> preempt_disable();
>
On Tue, Feb 02, 2021 at 03:07:51PM +0100, Miroslav Benes wrote:
> > preempt_disable();
> > - sym = find_symbol(symbol, &owner, NULL, NULL, true, true);
> > - if (sym && strong_try_module_get(owner))
> > - sym = NULL;
> > + if (!find_symbol(&fsa) || !strong_try_module_get(fsa.own
Simplify the calling convention by passing the find_symbol_args structure
to find_symbol instead of initializing it inside the function.
Signed-off-by: Christoph Hellwig
---
kernel/module.c | 113 ++--
1 file changed, 52 insertions(+), 61 deletions(-)
Simplify the calling convention by passing the find_symbol_args structure
to find_symbol instead of initializing it inside the function.
Signed-off-by: Christoph Hellwig
---
kernel/module.c | 113 ++--
1 file changed, 52 insertions(+), 61 deletions(-)
6 matches
Mail list logo