tools perf: Do not check spaces/blank lines when checking header file copy drift

We copy headers from include/, arch/ to allow tools/ use defines,
structs from newer kernels and still be able to build on older systems.

We then, as part of a build, check if those copies got out of sync, when
we emit a warning, so that we can check if something needs to be
reflected on the tools, e.g. a 'perf trace' syscall argument beautifier
needs tweaking.

But we don't have to be super strict with that, for instance, extra
spaces, tabs or blank lines aren't problematic, so change
check-headers.sh to have "--ignore-blank-lines --ignore-space-change" as
default "diff" arguments.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d8emqpdc3m2qtzt1ei8ra2tf@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6375f0ab
...@@ -37,7 +37,7 @@ include/uapi/asm-generic/mman-common.h ...@@ -37,7 +37,7 @@ include/uapi/asm-generic/mman-common.h
check () { check () {
file=$1 file=$1
opts= opts="--ignore-blank-lines --ignore-space-change"
shift shift
while [ -n "$*" ]; do while [ -n "$*" ]; do
...@@ -58,7 +58,7 @@ for i in $HEADERS; do ...@@ -58,7 +58,7 @@ for i in $HEADERS; do
done done
# diff with extra ignore lines # diff with extra ignore lines
check arch/x86/lib/memcpy_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
check arch/x86/lib/memset_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
check include/uapi/linux/mman.h -B -I "^#include <\(uapi/\)*asm/mman.h>" check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment