netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next] net: fjes: correct TRACE_INCLUDE_PATH
Date: Tue, 28 May 2024 19:33:22 -0700	[thread overview]
Message-ID: <20240529023322.3467755-1-kuba@kernel.org> (raw)

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(-)

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 */
-- 
2.45.1


             reply	other threads:[~2024-05-29  2:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29  2:33 Jakub Kicinski [this message]
2024-05-31  1:30 ` [PATCH net-next] net: fjes: correct TRACE_INCLUDE_PATH patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240529023322.3467755-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).