| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | #!/bin/sh | 
|  | 2 | # SPDX-License-Identifier: GPL-2.0 | 
|  | 3 |  | 
|  | 4 | FILES=' | 
|  | 5 | arch/x86/lib/insn.c | 
|  | 6 | arch/x86/lib/inat.c | 
|  | 7 | arch/x86/lib/x86-opcode-map.txt | 
|  | 8 | arch/x86/tools/gen-insn-attr-x86.awk | 
|  | 9 | arch/x86/include/asm/insn.h | 
|  | 10 | arch/x86/include/asm/inat.h | 
|  | 11 | arch/x86/include/asm/inat_types.h | 
|  | 12 | arch/x86/include/asm/orc_types.h | 
|  | 13 | ' | 
|  | 14 |  | 
|  | 15 | check() | 
|  | 16 | { | 
|  | 17 | local file=$1 | 
|  | 18 |  | 
|  | 19 | diff $file ../../$file > /dev/null || | 
|  | 20 | echo "Warning: synced file at 'tools/objtool/$file' differs from latest kernel version at '$file'" | 
|  | 21 | } | 
|  | 22 |  | 
|  | 23 | if [ ! -d ../../kernel ] || [ ! -d ../../tools ] || [ ! -d ../objtool ]; then | 
|  | 24 | exit 0 | 
|  | 25 | fi | 
|  | 26 |  | 
|  | 27 | for i in $FILES; do | 
|  | 28 | check $i | 
|  | 29 | done |