Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools: Remove unnecessary variables

There are several places where warnings variables are not needed,
remove them and directly return 0.

Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
Link: https://lore.kernel.org/r/20230530075649.21661-1-luhongfei@vivo.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

authored by

Lu Hongfei and committed by
Josh Poimboeuf
d49d1666 ff9a6459

+3 -4
+3 -4
tools/objtool/check.c
··· 3799 3799 static int validate_unret(struct objtool_file *file, struct instruction *insn) 3800 3800 { 3801 3801 struct instruction *next, *dest; 3802 - int ret, warnings = 0; 3802 + int ret; 3803 3803 3804 3804 for (;;) { 3805 3805 next = next_insn_to_validate(file, insn); ··· 3897 3897 insn = next; 3898 3898 } 3899 3899 3900 - return warnings; 3900 + return 0; 3901 3901 } 3902 3902 3903 3903 /* ··· 4132 4132 { 4133 4133 struct section *sec; 4134 4134 struct symbol *func; 4135 - int warnings = 0; 4136 4135 4137 4136 for_each_sec(file, sec) { 4138 4137 if (!(sec->sh.sh_flags & SHF_EXECINSTR)) ··· 4145 4146 } 4146 4147 } 4147 4148 4148 - return warnings; 4149 + return 0; 4149 4150 } 4150 4151 4151 4152 static int validate_symbol(struct objtool_file *file, struct section *sec,