mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-18 04:54:52 +00:00
objtool: Rename func_for_each_insn_all()
Now that func_for_each_insn() is available, rename func_for_each_insn_all(). This gets us: sym_for_each_insn() - iterate on symbol offset/len func_for_each_insn() - iterate on insn->func Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200324160924.083720147@infradead.org
This commit is contained in:
parent
dbf4aeb0a4
commit
f0f70adb78
1 changed files with 6 additions and 6 deletions
|
@ -72,7 +72,7 @@ static struct instruction *next_insn_same_func(struct objtool_file *file,
|
||||||
return find_insn(file, func->cfunc->sec, func->cfunc->offset);
|
return find_insn(file, func->cfunc->sec, func->cfunc->offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define func_for_each_insn_all(file, func, insn) \
|
#define func_for_each_insn(file, func, insn) \
|
||||||
for (insn = find_insn(file, func->sec, func->offset); \
|
for (insn = find_insn(file, func->sec, func->offset); \
|
||||||
insn; \
|
insn; \
|
||||||
insn = next_insn_same_func(file, insn))
|
insn = next_insn_same_func(file, insn))
|
||||||
|
@ -170,7 +170,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
|
||||||
if (!insn->func)
|
if (!insn->func)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
func_for_each_insn_all(file, func, insn) {
|
func_for_each_insn(file, func, insn) {
|
||||||
empty = false;
|
empty = false;
|
||||||
|
|
||||||
if (insn->type == INSN_RETURN)
|
if (insn->type == INSN_RETURN)
|
||||||
|
@ -185,7 +185,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
|
||||||
* case, the function's dead-end status depends on whether the target
|
* case, the function's dead-end status depends on whether the target
|
||||||
* of the sibling call returns.
|
* of the sibling call returns.
|
||||||
*/
|
*/
|
||||||
func_for_each_insn_all(file, func, insn) {
|
func_for_each_insn(file, func, insn) {
|
||||||
if (is_sibling_call(insn)) {
|
if (is_sibling_call(insn)) {
|
||||||
struct instruction *dest = insn->jump_dest;
|
struct instruction *dest = insn->jump_dest;
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ static void add_ignores(struct objtool_file *file)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
func_for_each_insn_all(file, func, insn)
|
func_for_each_insn(file, func, insn)
|
||||||
insn->ignore = true;
|
insn->ignore = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1122,7 +1122,7 @@ static void mark_func_jump_tables(struct objtool_file *file,
|
||||||
struct instruction *insn, *last = NULL;
|
struct instruction *insn, *last = NULL;
|
||||||
struct rela *rela;
|
struct rela *rela;
|
||||||
|
|
||||||
func_for_each_insn_all(file, func, insn) {
|
func_for_each_insn(file, func, insn) {
|
||||||
if (!last)
|
if (!last)
|
||||||
last = insn;
|
last = insn;
|
||||||
|
|
||||||
|
@ -1157,7 +1157,7 @@ static int add_func_jump_tables(struct objtool_file *file,
|
||||||
struct instruction *insn;
|
struct instruction *insn;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
func_for_each_insn_all(file, func, insn) {
|
func_for_each_insn(file, func, insn) {
|
||||||
if (!insn->jump_table)
|
if (!insn->jump_table)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue