[PATCH v6 04/20] modpost: remove unused argument from secref_whitelist()

Masahiro Yamada posted 20 patches 2 years, 8 months ago
There is a newer version of this series
[PATCH v6 04/20] modpost: remove unused argument from secref_whitelist()
Posted by Masahiro Yamada 2 years, 8 months ago
secref_whitelist() does not use the argument 'mismatch'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 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 ed2301e951a9..d2329ac32177 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1035,8 +1035,7 @@ static const struct sectioncheck *section_mismatch(
  *   refsymname = *.constprop.*
  *
  **/
-static int secref_whitelist(const struct sectioncheck *mismatch,
-			    const char *fromsec, const char *fromsym,
+static int secref_whitelist(const char *fromsec, const char *fromsym,
 			    const char *tosec, const char *tosym)
 {
 	/* Check for pattern 1 */
@@ -1206,7 +1205,7 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
 	tosym = sym_name(elf, to);
 
 	/* check whitelist - we may ignore it */
-	if (!secref_whitelist(mismatch, fromsec, fromsym, tosec, tosym))
+	if (!secref_whitelist(fromsec, fromsym, tosec, tosym))
 		return;
 
 	sec_mismatch_count++;
-- 
2.39.2
Re: [PATCH v6 04/20] modpost: remove unused argument from secref_whitelist()
Posted by Nick Desaulniers 2 years, 8 months ago
On Sun, May 21, 2023 at 9:05 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> secref_whitelist() does not use the argument 'mismatch'.

Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>  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 ed2301e951a9..d2329ac32177 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1035,8 +1035,7 @@ static const struct sectioncheck *section_mismatch(
>   *   refsymname = *.constprop.*
>   *
>   **/
> -static int secref_whitelist(const struct sectioncheck *mismatch,
> -                           const char *fromsec, const char *fromsym,
> +static int secref_whitelist(const char *fromsec, const char *fromsym,
>                             const char *tosec, const char *tosym)
>  {
>         /* Check for pattern 1 */
> @@ -1206,7 +1205,7 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
>         tosym = sym_name(elf, to);
>
>         /* check whitelist - we may ignore it */
> -       if (!secref_whitelist(mismatch, fromsec, fromsym, tosec, tosym))
> +       if (!secref_whitelist(fromsec, fromsym, tosec, tosym))
>                 return;
>
>         sec_mismatch_count++;
> --
> 2.39.2
>


-- 
Thanks,
~Nick Desaulniers