summaryrefslogtreecommitdiffstats
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-07-20 01:53:00 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-07-27 21:18:00 +0900
commitabe864b8e19adf33b48997de8bc1a8f095390ade (patch)
tree699bb0948240cf9c2d2dea912c8f8638064fb929 /scripts/mod/modpost.c
parent5764f6626f5f334b27e168a33735b3899d08bcd2 (diff)
downloadlinux-stable-abe864b8e19adf33b48997de8bc1a8f095390ade.tar.gz
linux-stable-abe864b8e19adf33b48997de8bc1a8f095390ade.tar.bz2
linux-stable-abe864b8e19adf33b48997de8bc1a8f095390ade.zip
modpost: use sym_get_data() to get module device_table data
Use sym_get_data() to replace the long code. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 75aa10413ad4..08411fff3e17 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -324,7 +324,7 @@ static void *sym_get_data_by_offset(const struct elf_info *info,
return (void *)info->hdr + sechdr->sh_offset + offset;
}
-static void *sym_get_data(const struct elf_info *info, const Elf_Sym *sym)
+void *sym_get_data(const struct elf_info *info, const Elf_Sym *sym)
{
return sym_get_data_by_offset(info, get_secindex(info, sym),
sym->st_value);