Skip to content

Commit

Permalink
objtool: Add machine_real_restart() to the noreturn list
Browse files Browse the repository at this point in the history
machine_real_restart() is annotated as '__noreturn", so add it to the
objtool noreturn list.  This fixes the following warning with clang and
CONFIG_CC_OPTIMIZE_FOR_SIZE=y:

  arch/x86/kernel/reboot.o: warning: objtool: native_machine_emergency_restart() falls through to next function machine_power_off()

Reported-by: Matthias Kaehlcke <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Tested-by: Matthias Kaehlcke <[email protected]>
Reviewed-by: Matthias Kaehlcke <[email protected]>
Link: https://lkml.kernel.org/r/791712792aa4431bdd55bf1beb33a169ddf3b4a2.1529423255.git.jpoimboe@redhat.com
  • Loading branch information
jpoimboe authored and KAGA-KOKO committed Jun 20, 2018
1 parent 9ffc59d commit 684fb24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/objtool/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ static int __dead_end_function(struct objtool_file *file, struct symbol *func,
"lbug_with_loc",
"fortify_panic",
"usercopy_abort",
"machine_real_restart",
};

if (func->bind == STB_WEAK)
Expand Down

0 comments on commit 684fb24

Please sign in to comment.