Skip to content

Commit

Permalink
kallsyms: add static qualifiers where missing
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
masahir0y committed Feb 19, 2019
1 parent 3a51ff3 commit f43e9da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/kallsyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ static int all_symbols = 0;
static int absolute_percpu = 0;
static int base_relative = 0;

int token_profit[0x10000];
static int token_profit[0x10000];

/* the table that holds the result of the compression */
unsigned char best_table[256][2];
unsigned char best_table_len[256];
static unsigned char best_table[256][2];
static unsigned char best_table_len[256];


static void usage(void)
Expand All @@ -80,7 +80,7 @@ static void usage(void)
* This ignores the intensely annoying "mapping symbols" found
* in ARM ELF files: $a, $t and $d.
*/
static inline int is_arm_mapping_symbol(const char *str)
static int is_arm_mapping_symbol(const char *str)
{
return str[0] == '$' && strchr("axtd", str[1])
&& (str[2] == '\0' || str[2] == '.');
Expand Down

0 comments on commit f43e9da

Please sign in to comment.