From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422796AbcBQSju (ORCPT ); Wed, 17 Feb 2016 13:39:50 -0500 Received: from mga03.intel.com ([134.134.136.65]:24180 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030205AbcBQSjs (ORCPT ); Wed, 17 Feb 2016 13:39:48 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,462,1449561600"; d="scan'208";a="748168720" From: Andi Kleen To: acme@kernel.org Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON Date: Wed, 17 Feb 2016 10:39:08 -0800 Message-Id: <1455734348-13690-1-git-send-email-andi@firstfloor.org> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen In my set up (separate objdir, DEBUG=1) tip perf doesn't build without this change. It may be that in some other setups asm/bug.h is implicitely included. But always include it into builtin-stat.c builtin-stat.c: In function ‘set_maps’: builtin-stat.c:2126:6: error: implicit declaration of function ‘WARN_ONCE’ [-Werror=implicit-function-declaration] if (WARN_ONCE(st->maps_allocated, "stats double allocation\n")) ^ builtin-stat.c:2126:2: error: nested extern declaration of ‘WARN_ONCE’ [-Werror=nested-externs] if (WARN_ONCE(st->maps_allocated, "stats double allocation\n")) ^ Signed-off-by: Andi Kleen --- tools/perf/builtin-stat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 6f24a96..a570e6d 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -60,6 +60,7 @@ #include "util/thread_map.h" #include "util/counts.h" #include "util/group.h" +#include "asm/bug.h" #include #include -- 2.5.0