diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-07-05 18:44:56 -0400 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-07-15 17:44:40 -0400 |
commit | c01406f8972154be6236d89f7f7f056ee289b9cf (patch) | |
tree | 64996c6e265e04546d8d50cc9240a0b7e276afc7 /drivers/net/wireless/ath/wil6210/trace.h | |
parent | 8d7f5df0fb4eaaef85c6b80caeafd5bd544159a5 (diff) |
tracing/ath: Use the new __vstring() helper
Instead of open coding a __dynamic_array() with a fixed length (which
defeats the purpose of the dynamic array in the first place). Use the new
__vstring() helper that will use a va_list and only write enough of the
string into the ring buffer that is needed.
Link: https://lkml.kernel.org/r/20220705224749.430339634@goodmis.org
Cc: Kalle Valo <kvalo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: ath11k@lists.infradead.org
Acked-by: Kalle Valo <kvalo@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/trace.h')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/trace.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/wil6210/trace.h b/drivers/net/wireless/ath/wil6210/trace.h index 11c989e95880..201f44612c31 100644 --- a/drivers/net/wireless/ath/wil6210/trace.h +++ b/drivers/net/wireless/ath/wil6210/trace.h @@ -70,13 +70,10 @@ DECLARE_EVENT_CLASS(wil6210_log_event, TP_PROTO(struct va_format *vaf), TP_ARGS(vaf), TP_STRUCT__entry( - __dynamic_array(char, msg, WIL6210_MSG_MAX) + __vstring(msg, vaf->fmt, vaf->va) ), TP_fast_assign( - WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg), - WIL6210_MSG_MAX, - vaf->fmt, - *vaf->va) >= WIL6210_MSG_MAX); + __assign_vstr(msg, vaf->fmt, vaf->va); ), TP_printk("%s", __get_str(msg)) ); |