All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON
@ 2016-02-17 18:39 Andi Kleen
  2016-02-17 18:52 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2016-02-17 18:39 UTC (permalink / raw)
  To: acme; +Cc: jolsa, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

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 <ak@linux.intel.com>
---
 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 <api/fs/fs.h>
 #include <stdlib.h>
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-17 21:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 18:39 [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON Andi Kleen
2016-02-17 18:52 ` Arnaldo Carvalho de Melo
2016-02-17 18:56   ` Arnaldo Carvalho de Melo
2016-02-17 19:15     ` Andi Kleen
2016-02-17 19:24       ` Arnaldo Carvalho de Melo
2016-02-17 21:22         ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.