* [PATCH] firewire: core: move copy_port_status() helper function to TP_fast_assign() block
@ 2024-07-12 0:04 Takashi Sakamoto
2024-07-12 0:25 ` Takashi Sakamoto
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Sakamoto @ 2024-07-12 0:04 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
It would be possible to put any statement in TP_fast_assign().
This commit obsoletes the helper function and put its statements to
TP_fast_assign() for the code simplicity.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
drivers/firewire/core-trace.c | 11 -----------
include/trace/events/firewire.h | 12 ++++++++++--
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/drivers/firewire/core-trace.c b/drivers/firewire/core-trace.c
index 5acb02c18a47..b70947fc7b8d 100644
--- a/drivers/firewire/core-trace.c
+++ b/drivers/firewire/core-trace.c
@@ -10,17 +10,6 @@
#include <trace/events/firewire.h>
#ifdef TRACEPOINTS_ENABLED
-void copy_port_status(u8 *port_status, unsigned int port_capacity,
- const u32 *self_id_sequence, unsigned int quadlet_count)
-{
- unsigned int port_index;
-
- for (port_index = 0; port_index < port_capacity; ++port_index) {
- port_status[port_index] =
- self_id_sequence_get_port_status(self_id_sequence, quadlet_count, port_index);
- }
-}
-
EXPORT_TRACEPOINT_SYMBOL_GPL(isoc_inbound_single_completions);
EXPORT_TRACEPOINT_SYMBOL_GPL(isoc_inbound_multiple_completions);
EXPORT_TRACEPOINT_SYMBOL_GPL(isoc_outbound_completions);
diff --git a/include/trace/events/firewire.h b/include/trace/events/firewire.h
index bac9d98e88e5..57a2be01d31a 100644
--- a/include/trace/events/firewire.h
+++ b/include/trace/events/firewire.h
@@ -407,8 +407,16 @@ TRACE_EVENT(self_id_sequence,
TP_fast_assign(
__entry->card_index = card_index;
__entry->generation = generation;
- copy_port_status(__get_dynamic_array(port_status), __get_dynamic_array_len(port_status),
- self_id_sequence, quadlet_count);
+ {
+ u8 *port_status = __get_dynamic_array(port_status);
+ unsigned int port_index;
+
+ for (port_index = 0; port_index < __get_dynamic_array_len(port_status); ++port_index) {
+ port_status[port_index] =
+ self_id_sequence_get_port_status(self_id_sequence,
+ quadlet_count, port_index);
+ }
+ }
memcpy(__get_dynamic_array(self_id_sequence), self_id_sequence,
__get_dynamic_array_len(self_id_sequence));
),
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] firewire: core: move copy_port_status() helper function to TP_fast_assign() block
2024-07-12 0:04 [PATCH] firewire: core: move copy_port_status() helper function to TP_fast_assign() block Takashi Sakamoto
@ 2024-07-12 0:25 ` Takashi Sakamoto
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Sakamoto @ 2024-07-12 0:25 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
Hi,
On Fri, Jul 12, 2024 at 09:04:24AM +0900, Takashi Sakamoto wrote:
> It would be possible to put any statement in TP_fast_assign().
>
> This commit obsoletes the helper function and put its statements to
> TP_fast_assign() for the code simplicity.
>
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
> drivers/firewire/core-trace.c | 11 -----------
> include/trace/events/firewire.h | 12 ++++++++++--
> 2 files changed, 10 insertions(+), 13 deletions(-)
I realized that the prototype of helper function still exists in
'include/trace/events/firewire.h'. Let me abandon this patch and
resend the revised version.
Regards
Takashi Sakamoto
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-12 0:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 0:04 [PATCH] firewire: core: move copy_port_status() helper function to TP_fast_assign() block Takashi Sakamoto
2024-07-12 0:25 ` Takashi Sakamoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.