Commit 47f570fc authored by Vineeth Pillai (Google)'s avatar Vineeth Pillai (Google) Committed by Steven Rostedt (Google)
Browse files

spi: Use trace_call__##name() at guarded tracepoint call sites

Replace trace_foo() with the new trace_call__foo() at sites already
guarded by trace_foo_enabled(), avoiding a redundant
static_branch_unlikely() re-evaluation inside the tracepoint.
trace_call__foo() calls the tracepoint callbacks directly without
utilizing the static branch again.

Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Nuno Sá <nuno.sa@analog.com>
Cc: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20260323160052.17528-14-vineeth@bitbyteword.org


Suggested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarVineeth Pillai (Google) <vineeth@bitbyteword.org>
Assisted-by: Claude:claude-sonnet-4-6
Acked-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent fa9ac2fd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ static int spi_engine_transfer_one_message(struct spi_controller *host,
		struct spi_transfer *xfer;

		list_for_each_entry(xfer, &msg->transfers, transfer_list)
			trace_spi_transfer_start(msg, xfer);
			trace_call__spi_transfer_start(msg, xfer);
	}

	spin_lock_irqsave(&spi_engine->lock, flags);
@@ -987,7 +987,7 @@ static int spi_engine_transfer_one_message(struct spi_controller *host,
		struct spi_transfer *xfer;

		list_for_each_entry(xfer, &msg->transfers, transfer_list)
			trace_spi_transfer_stop(msg, xfer);
			trace_call__spi_transfer_stop(msg, xfer);
	}

out: