Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbdHAT5h (ORCPT ); Tue, 1 Aug 2017 15:57:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:58630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116AbdHAT5c (ORCPT ); Tue, 1 Aug 2017 15:57:32 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E659923693 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Jiri Olsa , Namhyung Kim , Wang Nan Subject: [PATCH 06/18] tools perf: Do not check spaces/blank lines when checking header file copy drift Date: Tue, 1 Aug 2017 16:56:33 -0300 Message-Id: <20170801195645.16986-7-acme@kernel.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170801195645.16986-1-acme@kernel.org> References: <20170801195645.16986-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2216 Lines: 53 From: Arnaldo Carvalho de Melo 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 Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-d8emqpdc3m2qtzt1ei8ra2tf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/check-headers.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index ff0a5fabf055..3f0c6577f8cc 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -37,7 +37,7 @@ include/uapi/asm-generic/mman-common.h check () { file=$1 - opts= + opts="--ignore-blank-lines --ignore-space-change" shift while [ -n "$*" ]; do @@ -58,7 +58,7 @@ for i in $HEADERS; do done # diff with extra ignore lines -check arch/x86/lib/memcpy_64.S -B -I "^EXPORT_SYMBOL" -I "^#include " -check arch/x86/lib/memset_64.S -B -I "^EXPORT_SYMBOL" -I "^#include " -check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" -check include/uapi/linux/mman.h -B -I "^#include <\(uapi/\)*asm/mman.h>" +check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include " +check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include " +check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" +check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>" -- 2.9.4