[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=LR=UNOeWJDmM-McJ=FrCWTo8w1ox+KGMQCwCVpiUyFg@mail.gmail.com>
Date: Mon, 9 May 2022 10:19:47 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>,
Peter Zijlstra <peterz@...radead.org>,
linux-modules@...r.kernel.org, linux-s390@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, Ard Biesheuvel <ardb@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
clang-built-linux <llvm@...ts.linux.dev>
Subject: Re: [PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c
On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> modpost.c is too big, and the half of the code is for section checks.
> Split it.
>
> I fixed some style issues in the moved code.
It would be helpful for review if the split and restyle were distinct
patches. Otherwise I can't tell what has changed.
This does lose the ability to use git blame to get more context on
some of the oddities in modpost (which I have found useful in the
past). I don't feel strongly though.
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
>
> Changes in v4:
> - New patch
>
> scripts/mod/Makefile | 2 +-
> scripts/mod/modpost.c | 1202 +---------------------------------
> scripts/mod/modpost.h | 34 +-
> scripts/mod/section-check.c | 1222 +++++++++++++++++++++++++++++++++++
> 4 files changed, 1240 insertions(+), 1220 deletions(-)
> create mode 100644 scripts/mod/section-check.c
>
> diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
> index c9e38ad937fd..ca739c6c68a1 100644
> --- a/scripts/mod/Makefile
> +++ b/scripts/mod/Makefile
> @@ -5,7 +5,7 @@ CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO)
> hostprogs-always-y += modpost mk_elfconfig
> always-y += empty.o
>
> -modpost-objs := modpost.o file2alias.o sumversion.o
> +modpost-objs := modpost.o section-check.o file2alias.o sumversion.o
>
> devicetable-offsets-file := devicetable-offsets.h
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index a78b75f0eeb0..e7e2c70a98f5 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -31,7 +31,7 @@ static bool external_module;
> /* Only warn about unresolved symbols */
> static bool warn_unresolved;
>
> -static int sec_mismatch_count;
> +int sec_mismatch_count;
^ this should go in modpost.h if it is to be used in two translation
units, rather than forward declaring it in section-check.c. You did
this for the functions.
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists