From: "Naveen N. Rao" Subject: Re: [PATCH] KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE Date: Wed, 07 Nov 2018 19:49:08 +0530 Message-ID: <1541600158.a6gip2ac6c.naveen@linux.ibm.com> References: <20181107014934.26428-1-oss@buserror.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Cc: kvm@vger.kernel.org, Steven Rostedt , kvm-ppc@vger.kernel.org, Christian Zigotzky , linuxppc-dev@lists.ozlabs.org To: Alexander Graf , Scott Wood Return-path: In-Reply-To: <20181107014934.26428-1-oss@buserror.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: kvm.vger.kernel.org Scott Wood wrote: > TRACE_INCLUDE_PATH and TRACE_INCLUDE_FILE are used by > , so like that #include, they should > be outside #ifdef protection. >=20 > 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: >=20 > 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 >=20 > Reported-by: Christian Zigotzky > Signed-off-by: Scott Wood > --- > 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=20 patch: Reviewed-by: Naveen N. Rao >=20 > 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 @@ >=20 > #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=20 and before the header #ifdef. So, that would be good to do as part of=20 this cleanup as well. If not, I can send a patch later. Thanks, Naveen =