mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] RDMA/hns: fix trace TRACE_INCLUDE_PATH
@ 2025-05-07  3:04 Huiwen He
  2025-05-07  3:22 ` Junxian Huang
  0 siblings, 1 reply; 2+ messages in thread
From: Huiwen He @ 2025-05-07  3:04 UTC (permalink / raw)
  To: tangchengchang
  Cc: huangjunxian6, jgg, leon, linux-rdma, linux-kernel, Huiwen He

TRACE_INCLUDE_PATH should be a path relative to define_trace.h, not the
file including it. (See the comment in include/trace/define_trace.h.)

Fixes build error found with CONFIG_INFINIBAND_HNS_HIP08=m:
  CC [M]  drivers/infiniband/hw/hns/hns_roce_hw_v2.o
In file included from drivers/infiniband/hw/hns/hns_roce_trace.h:213,
                 from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:53:
./include/trace/define_trace.h:110:42: fatal error: ./hns_roce_trace.h: No such file or directory
  110 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)

Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
---
 drivers/infiniband/hw/hns/hns_roce_trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_trace.h b/drivers/infiniband/hw/hns/hns_roce_trace.h
index 23cbdbaeffaa..19bd3c0eec47 100644
--- a/drivers/infiniband/hw/hns/hns_roce_trace.h
+++ b/drivers/infiniband/hw/hns/hns_roce_trace.h
@@ -209,5 +209,5 @@ DEFINE_EVENT(cmdq, hns_cmdq_resp,
 #undef TRACE_INCLUDE_FILE
 #define TRACE_INCLUDE_FILE hns_roce_trace
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/infiniband/hw/hns
 #include <trace/define_trace.h>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/hns: fix trace TRACE_INCLUDE_PATH
  2025-05-07  3:04 [PATCH] RDMA/hns: fix trace TRACE_INCLUDE_PATH Huiwen He
@ 2025-05-07  3:22 ` Junxian Huang
  0 siblings, 0 replies; 2+ messages in thread
From: Junxian Huang @ 2025-05-07  3:22 UTC (permalink / raw)
  To: Huiwen He, tangchengchang; +Cc: jgg, leon, linux-rdma, linux-kernel



On 2025/5/7 11:04, Huiwen He wrote:
> TRACE_INCLUDE_PATH should be a path relative to define_trace.h, not the
> file including it. (See the comment in include/trace/define_trace.h.)
> 
> Fixes build error found with CONFIG_INFINIBAND_HNS_HIP08=m:
>   CC [M]  drivers/infiniband/hw/hns/hns_roce_hw_v2.o
> In file included from drivers/infiniband/hw/hns/hns_roce_trace.h:213,
>                  from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:53:
> ./include/trace/define_trace.h:110:42: fatal error: ./hns_roce_trace.h: No such file or directory
>   110 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
> 
> Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
> ---
>  drivers/infiniband/hw/hns/hns_roce_trace.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/hns/hns_roce_trace.h b/drivers/infiniband/hw/hns/hns_roce_trace.h
> index 23cbdbaeffaa..19bd3c0eec47 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_trace.h
> +++ b/drivers/infiniband/hw/hns/hns_roce_trace.h
> @@ -209,5 +209,5 @@ DEFINE_EVENT(cmdq, hns_cmdq_resp,
>  #undef TRACE_INCLUDE_FILE
>  #define TRACE_INCLUDE_FILE hns_roce_trace
>  #undef TRACE_INCLUDE_PATH
> -#define TRACE_INCLUDE_PATH .
> +#define TRACE_INCLUDE_PATH ../../drivers/infiniband/hw/hns
>  #include <trace/define_trace.h>

We've found this bug and decided to fix it by modifying Makefile, please see:
https://lore.kernel.org/linux-next/b7dd4dda-37d8-47e4-8d78-b6585be21cfd@paulmck-laptop/T/#t

Thanks anyway!

Junxian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-07  3:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-07  3:04 [PATCH] RDMA/hns: fix trace TRACE_INCLUDE_PATH Huiwen He
2025-05-07  3:22 ` Junxian Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®