* [PATCH] modpost: remove leftover symbol prefix handling for module device table
@ 2018-09-28 6:21 Masahiro Yamada
2018-09-29 7:00 ` Rusty Russell
2018-10-09 15:00 ` Masahiro Yamada
0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2018-09-28 6:21 UTC (permalink / raw)
To: linux-kbuild
Cc: Rusty Russell, Arnd Bergmann, Masahiro Yamada, Michal Marek,
linux-kernel
Blackfin and metag were the only architectures that prefix symbols with
an underscore. They were removed by commit 4ba66a976072 ("arch: remove
blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"),
respectively.
It is no longer necessary to handle <prefix> part of module device
table symbols.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
scripts/mod/file2alias.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 7be4369..ba4ebc4 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
return;
- /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
- name = strstr(symname, "__mod_");
- if (!name)
+ /* All our symbols are of form __mod_<name>__<identifier>_device_table. */
+ if (strncmp(symname, "__mod_", strlen("__mod_")))
return;
- name += strlen("__mod_");
+ name = symname + strlen("__mod_");
namelen = strlen(name);
if (namelen < strlen("_device_table"))
return;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] modpost: remove leftover symbol prefix handling for module device table
2018-09-28 6:21 [PATCH] modpost: remove leftover symbol prefix handling for module device table Masahiro Yamada
@ 2018-09-29 7:00 ` Rusty Russell
2018-10-09 15:00 ` Masahiro Yamada
1 sibling, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2018-09-29 7:00 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild
Cc: Arnd Bergmann, Masahiro Yamada, Michal Marek, linux-kernel, Jessica Yu
Please send this to the module maintainer (CC'd).
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> Blackfin and metag were the only architectures that prefix symbols with
> an underscore. They were removed by commit 4ba66a976072 ("arch: remove
> blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"),
> respectively.
>
> It is no longer necessary to handle <prefix> part of module device
> table symbols.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> scripts/mod/file2alias.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 7be4369..ba4ebc4 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
> if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
> return;
>
> - /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
> - name = strstr(symname, "__mod_");
> - if (!name)
> + /* All our symbols are of form __mod_<name>__<identifier>_device_table. */
> + if (strncmp(symname, "__mod_", strlen("__mod_")))
> return;
> - name += strlen("__mod_");
> + name = symname + strlen("__mod_");
> namelen = strlen(name);
> if (namelen < strlen("_device_table"))
> return;
> --
> 2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] modpost: remove leftover symbol prefix handling for module device table
@ 2018-09-29 7:00 ` Rusty Russell
0 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2018-09-29 7:00 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild
Cc: Arnd Bergmann, Michal Marek, linux-kernel, Jessica Yu
Please send this to the module maintainer (CC'd).
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> Blackfin and metag were the only architectures that prefix symbols with
> an underscore. They were removed by commit 4ba66a976072 ("arch: remove
> blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"),
> respectively.
>
> It is no longer necessary to handle <prefix> part of module device
> table symbols.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> scripts/mod/file2alias.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 7be4369..ba4ebc4 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
> if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
> return;
>
> - /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
> - name = strstr(symname, "__mod_");
> - if (!name)
> + /* All our symbols are of form __mod_<name>__<identifier>_device_table. */
> + if (strncmp(symname, "__mod_", strlen("__mod_")))
> return;
> - name += strlen("__mod_");
> + name = symname + strlen("__mod_");
> namelen = strlen(name);
> if (namelen < strlen("_device_table"))
> return;
> --
> 2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] modpost: remove leftover symbol prefix handling for module device table
2018-09-29 7:00 ` Rusty Russell
(?)
@ 2018-09-29 16:44 ` Masahiro Yamada
-1 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2018-09-29 16:44 UTC (permalink / raw)
To: Rusty Russell
Cc: Linux Kbuild mailing list, Arnd Bergmann, Michal Marek,
Linux Kernel Mailing List, Jessica Yu
2018年9月29日(土) 16:01 Rusty Russell <rusty@rustcorp.com.au>:
>
> Please send this to the module maintainer (CC'd).
I just sent this to Kbuild ML
since scripts/mod/ is listed in the Kbuild part.
Next time, I will try my best to remember
to CC the module maintainer.
Reviewed-by tags are appreciated.
KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
M: Masahiro Yamada <yamada.masahiro@socionext.com>
M: Michal Marek <michal.lkml@markovi.net>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
L: linux-kbuild@vger.kernel.org
S: Maintained
F: Documentation/kbuild/
F: Makefile
F: scripts/Kbuild*
F: scripts/Makefile*
F: scripts/basic/
F: scripts/mk*
F: scripts/mod/
F: scripts/package/
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> > Blackfin and metag were the only architectures that prefix symbols with
> > an underscore. They were removed by commit 4ba66a976072 ("arch: remove
> > blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"),
> > respectively.
> >
> > It is no longer necessary to handle <prefix> part of module device
> > table symbols.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
> > scripts/mod/file2alias.c | 7 +++----
> > 1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> > index 7be4369..ba4ebc4 100644
> > --- a/scripts/mod/file2alias.c
> > +++ b/scripts/mod/file2alias.c
> > @@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
> > if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
> > return;
> >
> > - /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
> > - name = strstr(symname, "__mod_");
> > - if (!name)
> > + /* All our symbols are of form __mod_<name>__<identifier>_device_table. */
> > + if (strncmp(symname, "__mod_", strlen("__mod_")))
> > return;
> > - name += strlen("__mod_");
> > + name = symname + strlen("__mod_");
> > namelen = strlen(name);
> > if (namelen < strlen("_device_table"))
> > return;
> > --
> > 2.7.4
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] modpost: remove leftover symbol prefix handling for module device table
2018-09-28 6:21 [PATCH] modpost: remove leftover symbol prefix handling for module device table Masahiro Yamada
2018-09-29 7:00 ` Rusty Russell
@ 2018-10-09 15:00 ` Masahiro Yamada
1 sibling, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2018-10-09 15:00 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Rusty Russell, Arnd Bergmann, Michal Marek, Linux Kernel Mailing List
On Fri, Sep 28, 2018 at 3:23 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Blackfin and metag were the only architectures that prefix symbols with
> an underscore. They were removed by commit 4ba66a976072 ("arch: remove
> blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"),
> respectively.
>
> It is no longer necessary to handle <prefix> part of module device
> table symbols.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Applied to linux-kbuild.
> scripts/mod/file2alias.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 7be4369..ba4ebc4 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
> if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
> return;
>
> - /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
> - name = strstr(symname, "__mod_");
> - if (!name)
> + /* All our symbols are of form __mod_<name>__<identifier>_device_table. */
> + if (strncmp(symname, "__mod_", strlen("__mod_")))
> return;
> - name += strlen("__mod_");
> + name = symname + strlen("__mod_");
> namelen = strlen(name);
> if (namelen < strlen("_device_table"))
> return;
> --
> 2.7.4
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-09 15:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28 6:21 [PATCH] modpost: remove leftover symbol prefix handling for module device table Masahiro Yamada
2018-09-29 7:00 ` Rusty Russell
2018-09-29 7:00 ` Rusty Russell
2018-09-29 16:44 ` Masahiro Yamada
2018-10-09 15:00 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.