[tip: objtool/core] objtool: Group headers to check in a single list

From: tip-bot2 for Julien Thierry
Date: Thu Sep 10 2020 - 14:59:10 EST

The following commit has been merged into the objtool/core branch of tip:

Commit-ID: 3890b8d92710af75baedf291832cf40193b33454
Gitweb: https://git.kernel.org/tip/3890b8d92710af75baedf291832cf40193b33454
Author: Julien Thierry <jthierry@xxxxxxxxxx>
AuthorDate: Fri, 04 Sep 2020 16:30:19 +01:00
Committer: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
CommitterDate: Thu, 10 Sep 2020 10:43:13 -05:00

objtool: Group headers to check in a single list

In order to support multiple architectures and potentially different
sets of headers to compare against their kernel equivalent, it is
simpler to have all headers to check in a single list.

Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>
Signed-off-by: Julien Thierry <jthierry@xxxxxxxxxx>
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
tools/objtool/sync-check.sh | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/tools/objtool/sync-check.sh b/tools/objtool/sync-check.sh
index aa099b2..b5f5266 100755
--- a/tools/objtool/sync-check.sh
+++ b/tools/objtool/sync-check.sh
@@ -1,14 +1,18 @@
# SPDX-License-Identifier: GPL-2.0

+arch/x86/include/asm/inat.h -I '^#include [\"<]\(asm/\)*inat_types.h[\">]'
+arch/x86/include/asm/insn.h -I '^#include [\"<]\(asm/\)*inat.h[\">]'
+arch/x86/lib/inat.c -I '^#include [\"<]\(../include/\)*asm/insn.h[\">]'
+arch/x86/lib/insn.c -I '^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]' -I '^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]'

check_2 () {
@@ -41,11 +45,12 @@ fi

cd ../..

-for i in $FILES; do
- check $i
+while read -r file_entry; do
+ if [ -z "$file_entry" ]; then
+ continue
+ fi

-check arch/x86/include/asm/inat.h '-I "^#include [\"<]\(asm/\)*inat_types.h[\">]"'
-check arch/x86/include/asm/insn.h '-I "^#include [\"<]\(asm/\)*inat.h[\">]"'
-check arch/x86/lib/inat.c '-I "^#include [\"<]\(../include/\)*asm/insn.h[\">]"'
-check arch/x86/lib/insn.c '-I "^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]" -I "^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]"'
+ check $file_entry
+done <<EOF