2019-01-25 07:24:49

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH] lightnvm: pblk: fix TRACE_INCLUDE_PATH

As the comment block in include/trace/define_trace.h says,
TRACE_INCLUDE_PATH should be a relative path to the define_trace.h

../../drivers/lightnvm is the correct relative path.

../../../drivers/lightnvm is working by coincidence because the top
Makefile adds -I$(srctree)/arch/$(SRCARCH)/include as a header
search path, but we should not rely on it.

Signed-off-by: Masahiro Yamada <[email protected]>
---

drivers/lightnvm/pblk-trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/lightnvm/pblk-trace.h b/drivers/lightnvm/pblk-trace.h
index 679e5c45..9534503 100644
--- a/drivers/lightnvm/pblk-trace.h
+++ b/drivers/lightnvm/pblk-trace.h
@@ -139,7 +139,7 @@ TRACE_EVENT(pblk_state,
/* This part must be outside protection */

#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH ../../../drivers/lightnvm
+#define TRACE_INCLUDE_PATH ../../drivers/lightnvm
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE pblk-trace
#include <trace/define_trace.h>
--
2.7.4



2019-01-25 08:04:02

by Hans Holmberg

[permalink] [raw]
Subject: Re: [PATCH] lightnvm: pblk: fix TRACE_INCLUDE_PATH

On Fri, Jan 25, 2019 at 8:35 AM Masahiro Yamada
<[email protected]> wrote:
>
> As the comment block in include/trace/define_trace.h says,
> TRACE_INCLUDE_PATH should be a relative path to the define_trace.h
>
> ../../drivers/lightnvm is the correct relative path.
>
> ../../../drivers/lightnvm is working by coincidence because the top
> Makefile adds -I$(srctree)/arch/$(SRCARCH)/include as a header
> search path, but we should not rely on it.

Nice catch, thanks!

Reviewed-by: Hans Holmberg <[email protected]>

>
> Signed-off-by: Masahiro Yamada <[email protected]>
> ---
>
> drivers/lightnvm/pblk-trace.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/pblk-trace.h b/drivers/lightnvm/pblk-trace.h
> index 679e5c45..9534503 100644
> --- a/drivers/lightnvm/pblk-trace.h
> +++ b/drivers/lightnvm/pblk-trace.h
> @@ -139,7 +139,7 @@ TRACE_EVENT(pblk_state,
> /* This part must be outside protection */
>
> #undef TRACE_INCLUDE_PATH
> -#define TRACE_INCLUDE_PATH ../../../drivers/lightnvm
> +#define TRACE_INCLUDE_PATH ../../drivers/lightnvm
> #undef TRACE_INCLUDE_FILE
> #define TRACE_INCLUDE_FILE pblk-trace
> #include <trace/define_trace.h>
> --
> 2.7.4
>

2019-01-25 08:18:46

by Matias Bjørling

[permalink] [raw]
Subject: Re: [PATCH] lightnvm: pblk: fix TRACE_INCLUDE_PATH

On 1/25/19 9:01 AM, Hans Holmberg wrote:
> On Fri, Jan 25, 2019 at 8:35 AM Masahiro Yamada
> <[email protected]> wrote:
>>
>> As the comment block in include/trace/define_trace.h says,
>> TRACE_INCLUDE_PATH should be a relative path to the define_trace.h
>>
>> ../../drivers/lightnvm is the correct relative path.
>>
>> ../../../drivers/lightnvm is working by coincidence because the top
>> Makefile adds -I$(srctree)/arch/$(SRCARCH)/include as a header
>> search path, but we should not rely on it.
>
> Nice catch, thanks!
>
> Reviewed-by: Hans Holmberg <[email protected]>
>
>>
>> Signed-off-by: Masahiro Yamada <[email protected]>
>> ---
>>
>> drivers/lightnvm/pblk-trace.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/lightnvm/pblk-trace.h b/drivers/lightnvm/pblk-trace.h
>> index 679e5c45..9534503 100644
>> --- a/drivers/lightnvm/pblk-trace.h
>> +++ b/drivers/lightnvm/pblk-trace.h
>> @@ -139,7 +139,7 @@ TRACE_EVENT(pblk_state,
>> /* This part must be outside protection */
>>
>> #undef TRACE_INCLUDE_PATH
>> -#define TRACE_INCLUDE_PATH ../../../drivers/lightnvm
>> +#define TRACE_INCLUDE_PATH ../../drivers/lightnvm
>> #undef TRACE_INCLUDE_FILE
>> #define TRACE_INCLUDE_FILE pblk-trace
>> #include <trace/define_trace.h>
>> --
>> 2.7.4
>>

Thanks Masahiro-san. Applied for 5.1.