From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] perf, tools, stat: Include asm/bug.h for WARN_ON
Date: Wed, 17 Feb 2016 15:52:09 -0300 [thread overview]
Message-ID: <20160217185209.GA9299@kernel.org> (raw)
In-Reply-To: <1455734348-13690-1-git-send-email-andi@firstfloor.org>
Em Wed, Feb 17, 2016 at 10:39:08AM -0800, Andi Kleen escreveu:
> 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.
Doesn't matter, as there is usage of something defined in that header,
so we must have it included
Thanks, applying your fix, after making it build on acme/perf/core:
[acme@jouet linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-stat.c
Hunk #1 FAILED at 60.
1 out of 1 hunk FAILED -- saving rejects to file tools/perf/builtin-stat.c.rej
[acme@jouet linux]$
> 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
next prev parent reply other threads:[~2016-02-17 18:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160217185209.GA9299@kernel.org \
--to=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).