[PATCH] spi: spidev_test: don't mix up rx_rate and tx_rate

From: Jonas Rebmann

Date: Fri Sep 25 2026 - 03:12:22 EST


When printing the transfer rate, correctly label tx as tx and rx as rx.

Reported-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Jonas Rebmann <jre@xxxxxxxxxxxxxx>
---

Good catch! Should I add this to v8?

tools/spi/spidev_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 5bd3159f61a7..1dfb748c1427 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -512,7 +512,7 @@ static void show_transfer_rate(void)
rx_rate = ((_read_count - prev_read_count) * 8) / (interval*1000.0);
tx_rate = ((_write_count - prev_write_count) * 8) / (interval*1000.0);
- printf("rate: tx %.1fkbps, rx %.1fkbps\n", rx_rate, tx_rate);
+ printf("rate: tx %.1fkbps, rx %.1fkbps\n", tx_rate, rx_rate);
prev_read_count = _read_count;
prev_write_count = _write_count;
--
2.56.0.rc0.108.gf0ef1b96a0