Skip to content

Commit

Permalink
spi: tegra210-quad: use WARN_ON_ONCE instead of WARN_ON for timeouts
Browse files Browse the repository at this point in the history
Some machines with tegra_qspi_combined_seq_xfer hardware issues generate
excessive kernel warnings, severely polluting the logs:

    dmesg | grep -i "WARNING:.*tegra_qspi_transfer_one_message" | wc -l
    94451

This patch replaces WARN_ON with WARN_ON_ONCE for timeout conditions to
reduce log spam. The subsequent error message still prints on each
occurrence, providing sufficient information about the failure, while
the stack trace is only needed once for debugging purposes.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20250401-tegra-v2-1-126c293ec047@debian.org
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Breno Leitao authored and Mark Brown committed Apr 15, 2025
1 parent 36ff6c3 commit 41c721f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-tegra210-quad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi,
(&tqspi->xfer_completion,
QSPI_DMA_TIMEOUT);

if (WARN_ON(ret == 0)) {
if (WARN_ON_ONCE(ret == 0)) {
dev_err(tqspi->dev, "QSPI Transfer failed with timeout: %d\n",
ret);
if (tqspi->is_curr_dma_xfer &&
Expand Down

0 comments on commit 41c721f

Please sign in to comment.