]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
kallsyms: change sym_entry::percpu_absolute to bool type
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 20 Jul 2024 16:21:14 +0000 (01:21 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 21 Jul 2024 16:24:22 +0000 (01:24 +0900)
This field is boolean.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kallsyms.c

index 9a0535c59702458e93a3a679c636281af9c9e93f..0ed873491bf555e64da7b92662459d28ad8e7382 100644 (file)
@@ -36,7 +36,7 @@ struct sym_entry {
        unsigned long long addr;
        unsigned int len;
        unsigned int seq;
-       unsigned int percpu_absolute;
+       bool percpu_absolute;
        unsigned char sym[];
 };
 
@@ -181,7 +181,7 @@ static struct sym_entry *read_symbol(FILE *in, char **buf, size_t *buf_len)
        sym->len = len;
        sym->sym[0] = type;
        strcpy(sym_name(sym), name);
-       sym->percpu_absolute = 0;
+       sym->percpu_absolute = false;
 
        return sym;
 }
@@ -339,7 +339,7 @@ static int expand_symbol(const unsigned char *data, int len, char *result)
        return total;
 }
 
-static int symbol_absolute(const struct sym_entry *s)
+static bool symbol_absolute(const struct sym_entry *s)
 {
        return s->percpu_absolute;
 }
@@ -781,7 +781,7 @@ static void make_percpus_absolute(void)
                         * versions of this tool.
                         */
                        table[i]->sym[0] = 'A';
-                       table[i]->percpu_absolute = 1;
+                       table[i]->percpu_absolute = true;
                }
 }