Skip to content

Commit

Permalink
module: Make is_valid_name() return bool
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tiezhu Yang authored and mcgrof committed Nov 1, 2023
1 parent 60da364 commit 04311b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 04311b9

Please sign in to comment.