Skip to contentSkip to conversation

spi: stm32: Print summary 'callbacks suppressed' message

PATCH In review Marek Vasut 2 participants 2 messages Oct 18, 2022 – Oct 24, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: stm32: Print summary 'callbacks suppressed' message

The original fix "spi: stm32: Rate-limit the 'Communication suspended' message" still leads to "stm32h7_spi_irq_thread: 1696 callbacks suppressed" spew in the kernel log. Since this 'Communication suspended' message is a debug print, add RATELIMIT_MSG_ON_RELEASE flag to inhibit the "callbacks suspended" part during normal operation and only print summary at the end.

Fixes ea8be08cc9358 ("spi: stm32: Rate-limit the 'Communication suspended' message")

---
Cc: Alexandre Torgue <[email protected]>
Cc: Amelie Delaunay <[email protected]>
Cc: Antonio Borneo <[email protected]>
Cc: Mark Brown <[email protected]>

---
 drivers/spi/spi-stm32.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-stm32.c +1 -0
index 6fe617b445a59..3c2fa2e2f94a3 100644
@@ -886,6 +886,7 @@ static irqreturn_t stm32h7_spi_irq_thread(int irq, void *dev_id)
 		static DEFINE_RATELIMIT_STATE(rs,
 					      DEFAULT_RATELIMIT_INTERVAL * 10,
 					      1);
+		ratelimit_set_flags(&rs, RATELIMIT_MSG_ON_RELEASE);
 		if (__ratelimit(&rs))
 			dev_dbg_ratelimited(spi->dev, "Communication suspended\n");
 		if (!spi->cur_usedma && (spi->rx_buf && (spi->rx_len > 0)))
Signature · 1 line
2.35.1
maintainer
#1 lore raw
Quoted 8 lines · Marek Vasut

The original fix "spi: stm32: Rate-limit the 'Communication suspended' message" still leads to "stm32h7_spi_irq_thread: 1696 callbacks suppressed" spew in the kernel log. Since this 'Communication suspended' message is a debug print, add RATELIMIT_MSG_ON_RELEASE flag to inhibit the "callbacks suspended" part during normal operation and only print summary at the end.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: stm32: Print summary 'callbacks suppressed' message

      commit: 195583504be28df5d608a4677dd796117aea875f

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark