lkml.org 
[lkml]   [2018]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] modpost: remove leftover symbol prefix handling for module device table
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

\
 
 \ /
  Last update: 2018-10-09 17:01    [W:0.053 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site