kallsyms: fix type of kallsyms_token_table[]
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 2 Feb 2020 05:09:22 +0000 (14:09 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 5 Feb 2020 04:45:37 +0000 (13:45 +0900)
kallsyms_token_table[] only contains ASCII characters. It should be
char instead of u8.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
kernel/kallsyms.c

index 136ce04..53f84f6 100644 (file)
@@ -44,7 +44,7 @@ __attribute__((weak, section(".rodata")));
 extern const unsigned long kallsyms_relative_base
 __attribute__((weak, section(".rodata")));
 
-extern const u8 kallsyms_token_table[] __weak;
+extern const char kallsyms_token_table[] __weak;
 extern const u16 kallsyms_token_index[] __weak;
 
 extern const unsigned int kallsyms_markers[] __weak;
@@ -58,7 +58,8 @@ static unsigned int kallsyms_expand_symbol(unsigned int off,
                                           char *result, size_t maxlen)
 {
        int len, skipped_first = 0;
-       const u8 *tptr, *data;
+       const char *tptr;
+       const u8 *data;
 
        /* Get the compressed symbol length from the first symbol byte. */
        data = &kallsyms_names[off];