From: Steven Rostedt <rostedt@goodmis.org>
To: Pawel Laszczak <pawell@cadence.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [BUG] str not used in cdns3 trace events
Date: Fri, 1 Jul 2022 12:13:53 -0400 [thread overview]
Message-ID: <20220701121353.17a0b1ae@gandalf.local.home> (raw)
Hi,
I'm doing updates to add __vstring (dynamically created strings in trace
events) and came across the trace events in:
drivers/usb/cdns3/trace.h
Where there is several cases of this:
+DECLARE_EVENT_CLASS(cdns3_log_usb_irq,
+ TP_PROTO(struct cdns3_device *priv_dev, u32 usb_ists),
+ TP_ARGS(priv_dev, usb_ists),
+ TP_STRUCT__entry(
+ __field(enum usb_device_speed, speed)
+ __field(u32, usb_ists)
+ __dynamic_array(char, str, CDNS3_MSG_MAX)
+ ),
+ TP_fast_assign(
+ __entry->speed = cdns3_get_speed(priv_dev);
+ __entry->usb_ists = usb_ists;
+ ),
+ TP_printk("%s", cdns3_decode_usb_irq(__get_str(str), __entry->speed,
+ __entry->usb_ists))
+);
I see you create a dynamic array for "str" and even reference it in the
print with __get_str(str). But it is never assigned in TP_fast_assign().
This looks to be a bug to me. Can you explain this please?
-- Steve
next reply other threads:[~2022-07-01 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 16:13 Steven Rostedt [this message]
2022-07-01 16:39 ` Steven Rostedt
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=20220701121353.17a0b1ae@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=felipe.balbi@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pawell@cadence.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
all inboxes | Powered by JetHome®