[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNARGNEDzPPUsPjDXsXUUUPSFK2erQRuyPocR_v5hTYRihg@mail.gmail.com>
Date: Tue, 10 May 2022 15:55:53 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>,
Peter Zijlstra <peterz@...radead.org>,
linux-modules <linux-modules@...r.kernel.org>,
linux-s390 <linux-s390@...r.kernel.org>,
linuxppc-dev <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 Tue, May 10, 2022 at 2:20 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> 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.
OK, I will just move the code in v5.
> > 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.
Sorry, I do not understand.
In modpost.h, I put the declaration:
extern int sec_mismatch_count;
If I moved it to the header without 'extern'
I would get multiple definitions.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists