linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ptp: Use ratelimite for freerun error message
@ 2025-06-13 17:15 Breno Leitao
  2025-06-16 10:17 ` Simon Horman
  2025-06-16 22:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Breno Leitao @ 2025-06-13 17:15 UTC (permalink / raw)
  To: Richard Cochran, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, kernel-team, Breno Leitao

Replace pr_err() with pr_err_ratelimited() in ptp_clock_settime() to
prevent log flooding when the physical clock is free running, which
happens on some of my hosts. This ensures error messages are
rate-limited and improves kernel log readability.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/ptp/ptp_clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 35a5994bf64f6..335e88d3ebdff 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -96,7 +96,7 @@ static int ptp_clock_settime(struct posix_clock *pc, const struct timespec64 *tp
 	struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
 
 	if (ptp_clock_freerun(ptp)) {
-		pr_err("ptp: physical clock is free running\n");
+		pr_err_ratelimited("ptp: physical clock is free running\n");
 		return -EBUSY;
 	}
 

---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250613-ptp-58caf257a064

Best regards,
-- 
Breno Leitao <leitao@debian.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ptp: Use ratelimite for freerun error message
  2025-06-13 17:15 [PATCH net-next] ptp: Use ratelimite for freerun error message Breno Leitao
@ 2025-06-16 10:17 ` Simon Horman
  2025-06-16 22:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-06-16 10:17 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Richard Cochran, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel, kernel-team

On Fri, Jun 13, 2025 at 10:15:46AM -0700, Breno Leitao wrote:
> Replace pr_err() with pr_err_ratelimited() in ptp_clock_settime() to
> prevent log flooding when the physical clock is free running, which
> happens on some of my hosts. This ensures error messages are
> rate-limited and improves kernel log readability.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ptp: Use ratelimite for freerun error message
  2025-06-13 17:15 [PATCH net-next] ptp: Use ratelimite for freerun error message Breno Leitao
  2025-06-16 10:17 ` Simon Horman
@ 2025-06-16 22:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-16 22:30 UTC (permalink / raw)
  To: Breno Leitao
  Cc: richardcochran, andrew+netdev, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, kernel-team

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 13 Jun 2025 10:15:46 -0700 you wrote:
> Replace pr_err() with pr_err_ratelimited() in ptp_clock_settime() to
> prevent log flooding when the physical clock is free running, which
> happens on some of my hosts. This ensures error messages are
> rate-limited and improves kernel log readability.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
> 
> [...]

Here is the summary with links:
  - [net-next] ptp: Use ratelimite for freerun error message
    https://git.kernel.org/netdev/net-next/c/e9a7795e75b7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-16 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 17:15 [PATCH net-next] ptp: Use ratelimite for freerun error message Breno Leitao
2025-06-16 10:17 ` Simon Horman
2025-06-16 22:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).