diff mbox series

[net-next] net: fjes: correct TRACE_INCLUDE_PATH

Message ID 20240529023322.3467755-1-kuba@kernel.org (mailing list archive)
State Accepted
Commit 57e3c5af2befaf54cbae326fe800c148852e67a1
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: fjes: correct TRACE_INCLUDE_PATH | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 936 this patch: 936
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 5 maintainers not CCed: thomas.hellstrom@linux.intel.com rostedt@goodmis.org tiwai@suse.de djwong@kernel.org jani.nikula@intel.com
netdev/build_clang success Errors and warnings before: 906 this patch: 906
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 940 this patch: 940
netdev/checkpatch warning CHECK: spaces preferred around that '/' (ctx:VxV)
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-05-30--06-00 (tests: 1042)

Commit Message

Jakub Kicinski May 29, 2024, 2:33 a.m. UTC
A comment in define_trace.h clearly states:

 TRACE_INCLUDE_PATH if the path is something other than core kernel
                                                           vvvvvvvvvvvvvv
 include/trace then this macro can define the path to use. Note, the path
 is relative to define_trace.h, not the file including it. Full path names
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 for out of tree modules must be used.

fjes uses path relative to itself. Which (somehow) works most of
the time. Except when the kernel tree is "nested" in another
kernel tree, and ../drivers/net/fjes actually exists. In which
case build will use the header file from the wrong directory.

I've been trying to figure out why net NIPA builder is constantly
failing for the last 5 days, with:

include/trace/../../../drivers/net/fjes/fjes_trace.h:88:17: error: ‘__assign_str’ undeclared (first use in this function)
   88 |                 __assign_str(err, err);
      |                 ^~~~~~~~~~~~

when the line in the tree clearly has only one "err". NIPA does
indeed have "nested" trees, because it uses git work-trees and
the tree on the "outside" is not very up to date.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/fjes/fjes_trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 31, 2024, 1:30 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 28 May 2024 19:33:22 -0700 you wrote:
> A comment in define_trace.h clearly states:
> 
>  TRACE_INCLUDE_PATH if the path is something other than core kernel
>                                                            vvvvvvvvvvvvvv
>  include/trace then this macro can define the path to use. Note, the path
>  is relative to define_trace.h, not the file including it. Full path names
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  for out of tree modules must be used.
> 
> [...]

Here is the summary with links:
  - [net-next] net: fjes: correct TRACE_INCLUDE_PATH
    https://git.kernel.org/netdev/net-next/c/57e3c5af2bef

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/fjes/fjes_trace.h b/drivers/net/fjes/fjes_trace.h
index 6437ddbd7842..2d3f0dddd375 100644
--- a/drivers/net/fjes/fjes_trace.h
+++ b/drivers/net/fjes/fjes_trace.h
@@ -358,7 +358,7 @@  TRACE_EVENT(fjes_stop_req_irq_post,
 
 #undef TRACE_INCLUDE_PATH
 #undef TRACE_INCLUDE_FILE
-#define TRACE_INCLUDE_PATH ../../../drivers/net/fjes
+#define TRACE_INCLUDE_PATH ../../drivers/net/fjes
 #define TRACE_INCLUDE_FILE fjes_trace
 
 /* This part must be outside protection */