From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Alexander Graf <agraf@suse.de>, Scott Wood <oss@buserror.net>
Cc: kvm@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>,
kvm-ppc@vger.kernel.org,
Christian Zigotzky <chzigotzky@xenosoft.de>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
Date: Wed, 07 Nov 2018 19:49:08 +0530 [thread overview]
Message-ID: <1541600158.a6gip2ac6c.naveen@linux.ibm.com> (raw)
In-Reply-To: <20181107014934.26428-1-oss@buserror.net>
Scott Wood wrote:
> TRACE_INCLUDE_PATH and TRACE_INCLUDE_FILE are used by
> <trace/define_trace.h>, so like that #include, they should
> be outside #ifdef protection.
>
> They also need to be #undefed before defining, in case multiple trace
> headers are included by the same C file. This became the case on
> book3e after commit cf4a6085151a ("powerpc/mm: Add missing tracepoint for
> tlbie"), leading to the following build error:
>
> CC arch/powerpc/kvm/powerpc.o
> In file included from arch/powerpc/kvm/powerpc.c:51:0:
> arch/powerpc/kvm/trace.h:9:0: error: "TRACE_INCLUDE_PATH" redefined
> [-Werror]
> #define TRACE_INCLUDE_PATH .
> ^
> In file included from arch/powerpc/kvm/../mm/mmu_decl.h:25:0,
> from arch/powerpc/kvm/powerpc.c:48:
> ./arch/powerpc/include/asm/trace.h:224:0: note: this is the location of
> the previous definition
> #define TRACE_INCLUDE_PATH asm
> ^
> cc1: all warnings being treated as errors
>
> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
> Signed-off-by: Scott Wood <oss@buserror.net>
> ---
> arch/powerpc/kvm/trace.h | 8 ++++++--
> arch/powerpc/kvm/trace_booke.h | 9 +++++++--
> arch/powerpc/kvm/trace_hv.h | 9 +++++++--
> arch/powerpc/kvm/trace_pr.h | 9 +++++++--
> 4 files changed, 27 insertions(+), 8 deletions(-)
Thanks for getting to this. Apart from a small nit below, for this
patch:
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>
> diff --git a/arch/powerpc/kvm/trace.h b/arch/powerpc/kvm/trace.h
> index 491b0f715d6b..ea1d7c808319 100644
> --- a/arch/powerpc/kvm/trace.h
> +++ b/arch/powerpc/kvm/trace.h
> @@ -6,8 +6,6 @@
>
> #undef TRACE_SYSTEM
> #define TRACE_SYSTEM kvm
> -#define TRACE_INCLUDE_PATH .
> -#define TRACE_INCLUDE_FILE trace
The convention is to also have the TRACE_SYSTEM macro defined outside
and before the header #ifdef. So, that would be good to do as part of
this cleanup as well. If not, I can send a patch later.
Thanks,
Naveen
next prev parent reply other threads:[~2018-11-07 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 1:49 [PATCH] KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE Scott Wood
2018-11-07 14:19 ` Naveen N. Rao [this message]
2018-11-07 21:27 ` Michael Ellerman
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=1541600158.a6gip2ac6c.naveen@linux.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=chzigotzky@xenosoft.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oss@buserror.net \
--cc=rostedt@goodmis.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).