lkml.org 
[lkml]   [2022]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/5] modpost: remove the unused argument of check_sec_ref()
On Mon, May 23, 2022 at 9:48 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> check_sec_ref() does not use the first parameter 'mod'.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Perhaps we could enable some -W flags for scripts/mod/?
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>
> scripts/mod/modpost.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 845bc438ca49..843c64eebe8b 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1883,8 +1883,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
> * to find all references to a section that reference a section that will
> * be discarded and warns about it.
> **/
> -static void check_sec_ref(struct module *mod, const char *modname,
> - struct elf_info *elf)
> +static void check_sec_ref(const char *modname, struct elf_info *elf)
> {
> int i;
> Elf_Shdr *sechdrs = elf->sechdrs;
> @@ -2069,7 +2068,7 @@ static void read_symbols(const char *modname)
> sym_get_data(&info, sym));
> }
>
> - check_sec_ref(mod, modname, &info);
> + check_sec_ref(modname, &info);
>
> if (!mod->is_vmlinux) {
> version = get_modinfo(&info, "version");
> --
> 2.32.0
>


--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2022-05-24 22:44    [W:1.110 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site