module: Make is_valid_name() return bool
authorTiezhu Yang <yangtiezhu@loongson.cn>
Fri, 16 Jun 2023 01:51:33 +0000 (09:51 +0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Wed, 1 Nov 2023 20:07:08 +0000 (13:07 -0700)
The return value of is_valid_name() is true or false,
so change its type to reflect that.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
scripts/mod/modpost.c

index b3dee80497cb2b1fdfa488d42c14294def73749a..ea72af229d2b6b01e67ae2924f5688233c23a158 100644 (file)
@@ -1059,12 +1059,12 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
  * only by merging __exit and __init sections into __text, bloating
  * the kernel (which is especially evil on embedded platforms).
  */
-static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym)
+static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym)
 {
        const char *name = elf->strtab + sym->st_name;
 
        if (!name || !strlen(name))
-               return 0;
+               return false;
        return !is_mapping_symbol(name);
 }