forked from beagleboard/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
objtool: Move kernel headers/code sync check to a script
commit 3bd51c5 upstream. Replace the nasty diff checks in the objtool Makefile with a clean bash script, and make the warnings more specific. Heavily inspired by tools/perf/check-headers.sh. Suggested-by: Ingo Molnar <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/ab015f15ccd8c0c6008493c3c6ee3d495eaf2927.1509974346.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information
Showing
2 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
FILES=' | ||
arch/x86/lib/insn.c | ||
arch/x86/lib/inat.c | ||
arch/x86/lib/x86-opcode-map.txt | ||
arch/x86/tools/gen-insn-attr-x86.awk | ||
arch/x86/include/asm/insn.h | ||
arch/x86/include/asm/inat.h | ||
arch/x86/include/asm/inat_types.h | ||
arch/x86/include/asm/orc_types.h | ||
' | ||
|
||
check() | ||
{ | ||
local file=$1 | ||
|
||
diff $file ../../$file > /dev/null || | ||
echo "Warning: synced file at 'tools/objtool/$file' differs from latest kernel version at '$file'" | ||
} | ||
|
||
if [ ! -d ../../kernel ] || [ ! -d ../../tools ] || [ ! -d ../objtool ]; then | ||
exit 0 | ||
fi | ||
|
||
for i in $FILES; do | ||
check $i | ||
done |