drm/tegra: trace: Fix path to include

Message ID 20170823171326.23620-1-thierry.reding@gmail.com
State New
Headers show

Commit Message

Thierry Reding Aug. 23, 2017, 5:13 p.m.
From: Thierry Reding <treding@nvidia.com>

The TRACE_INCLUDE_FILE macro needs to specify the path relative to the
define_trace.h header rather than relative to the file defining it.

Reported-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/tegra/trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dmitry Osipenko Aug. 23, 2017, 7:56 p.m. | #1
On 23.08.2017 20:13, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The TRACE_INCLUDE_FILE macro needs to specify the path relative to the
> define_trace.h header rather than relative to the file defining it.
> 
> Reported-by: Dmitry Osipenko <digetx@gmail.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpu/drm/tegra/trace.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tegra/trace.h b/drivers/gpu/drm/tegra/trace.h
> index e9b7cdad5c4c..5a1ab4046e92 100644
> --- a/drivers/gpu/drm/tegra/trace.h
> +++ b/drivers/gpu/drm/tegra/trace.h
> @@ -63,6 +63,6 @@ DEFINE_EVENT(register_access, sor_readl,
>  
>  /* This part must be outside protection */
>  #undef TRACE_INCLUDE_PATH
> -#define TRACE_INCLUDE_PATH .
> +#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/tegra
>  #define TRACE_INCLUDE_FILE trace
>  #include <trace/define_trace.h>
> 

This variant works too!

Tested-by: Dmitry Osipenko <digetx@gmail.com>

Patch

diff --git a/drivers/gpu/drm/tegra/trace.h b/drivers/gpu/drm/tegra/trace.h
index e9b7cdad5c4c..5a1ab4046e92 100644
--- a/drivers/gpu/drm/tegra/trace.h
+++ b/drivers/gpu/drm/tegra/trace.h
@@ -63,6 +63,6 @@  DEFINE_EVENT(register_access, sor_readl,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/tegra
 #define TRACE_INCLUDE_FILE trace
 #include <trace/define_trace.h>