* [PATCH v2] modpost: turn static exports into error
@ 2020-12-01 16:52 Quentin Perret
2020-12-16 6:20 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Quentin Perret @ 2020-12-01 16:52 UTC (permalink / raw)
To: masahiroy, michal.lkml
Cc: linux-kbuild, linux-kernel, gregkh, kernel-team, maennich,
Quentin Perret
Using EXPORT_SYMBOL*() on static functions is fundamentally wrong.
Modpost currently reports that as a warning, but clearly this is not a
pattern we should allow, and all in-tree occurences should have been
fixed by now. So, promote the warn() message to error() to make sure
this never happens again.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
v2: now depends on 20201201103418.675850-2-masahiroy@kernel.org
---
scripts/mod/modpost.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 43e00867623a..5562526c8c32 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2648,9 +2648,9 @@ int main(int argc, char **argv)
for (s = symbolhash[n]; s; s = s->next) {
if (s->is_static)
- warn("\"%s\" [%s] is a static %s\n",
- s->name, s->module->name,
- export_str(s->export));
+ error("\"%s\" [%s] is a static %s\n",
+ s->name, s->module->name,
+ export_str(s->export));
}
}
--
2.29.2.454.gaff20da3a2-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] modpost: turn static exports into error
2020-12-01 16:52 [PATCH v2] modpost: turn static exports into error Quentin Perret
@ 2020-12-16 6:20 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2020-12-16 6:20 UTC (permalink / raw)
To: Quentin Perret
Cc: Michal Marek, Linux Kbuild mailing list,
Linux Kernel Mailing List, Greg Kroah-Hartman, Cc: Android Kernel,
Matthias Maennich
On Wed, Dec 2, 2020 at 1:52 AM Quentin Perret <qperret@google.com> wrote:
>
> Using EXPORT_SYMBOL*() on static functions is fundamentally wrong.
> Modpost currently reports that as a warning, but clearly this is not a
> pattern we should allow, and all in-tree occurences should have been
> fixed by now. So, promote the warn() message to error() to make sure
> this never happens again.
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reviewed-by: Matthias Maennich <maennich@google.com>
> Signed-off-by: Quentin Perret <qperret@google.com>
>
> ---
> v2: now depends on 20201201103418.675850-2-masahiroy@kernel.org
Applied to linux-kbuild. Thanks.
> ---
> scripts/mod/modpost.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 43e00867623a..5562526c8c32 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -2648,9 +2648,9 @@ int main(int argc, char **argv)
>
> for (s = symbolhash[n]; s; s = s->next) {
> if (s->is_static)
> - warn("\"%s\" [%s] is a static %s\n",
> - s->name, s->module->name,
> - export_str(s->export));
> + error("\"%s\" [%s] is a static %s\n",
> + s->name, s->module->name,
> + export_str(s->export));
> }
> }
>
> --
> 2.29.2.454.gaff20da3a2-goog
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-16 6:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-01 16:52 [PATCH v2] modpost: turn static exports into error Quentin Perret
2020-12-16 6:20 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox