diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-02-03 20:53:16 -0500 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-02-19 08:50:33 -0500 |
| commit | f43e9daace4efc146aa653179bdebb478be5de8a (patch) | |
| tree | fd7f81bf5d7cb36c9bd29b23699b0a0999022e5b /scripts | |
| parent | 3a51ff344204e4f23b6ee9c564ac76e207a9e130 (diff) | |
kallsyms: add static qualifiers where missing
Fix the following sparse warnings:
scripts/kallsyms.c:65:5: warning: symbol 'token_profit' was not declared. Should it be static?
scripts/kallsyms.c:68:15: warning: symbol 'best_table' was not declared. Should it be static?
scripts/kallsyms.c:69:15: warning: symbol 'best_table_len' was not declared. Should it be static?
Also, remove 'inline' from is_arm_mapping_symbol(). The compiler
will inline it anyway when it is appropriate to do so.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kallsyms.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 77cebad0474e..fc00bb01faf0 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
| @@ -62,11 +62,11 @@ static int all_symbols = 0; | |||
| 62 | static int absolute_percpu = 0; | 62 | static int absolute_percpu = 0; |
| 63 | static int base_relative = 0; | 63 | static int base_relative = 0; |
| 64 | 64 | ||
| 65 | int token_profit[0x10000]; | 65 | static int token_profit[0x10000]; |
| 66 | 66 | ||
| 67 | /* the table that holds the result of the compression */ | 67 | /* the table that holds the result of the compression */ |
| 68 | unsigned char best_table[256][2]; | 68 | static unsigned char best_table[256][2]; |
| 69 | unsigned char best_table_len[256]; | 69 | static unsigned char best_table_len[256]; |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | static void usage(void) | 72 | static void usage(void) |
| @@ -80,7 +80,7 @@ static void usage(void) | |||
| 80 | * This ignores the intensely annoying "mapping symbols" found | 80 | * This ignores the intensely annoying "mapping symbols" found |
| 81 | * in ARM ELF files: $a, $t and $d. | 81 | * in ARM ELF files: $a, $t and $d. |
| 82 | */ | 82 | */ |
| 83 | static inline int is_arm_mapping_symbol(const char *str) | 83 | static int is_arm_mapping_symbol(const char *str) |
| 84 | { | 84 | { |
| 85 | return str[0] == '$' && strchr("axtd", str[1]) | 85 | return str[0] == '$' && strchr("axtd", str[1]) |
| 86 | && (str[2] == '\0' || str[2] == '.'); | 86 | && (str[2] == '\0' || str[2] == '.'); |
