Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ptp: Use ratelimite for freerun error message

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>
Link: https://patch.msgid.link/20250613-ptp-v1-1-ee44260ce9e2@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
e9a7795e de74998c

+1 -1
+1 -1
drivers/ptp/ptp_clock.c
··· 96 96 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); 97 97 98 98 if (ptp_clock_freerun(ptp)) { 99 - pr_err("ptp: physical clock is free running\n"); 99 + pr_err_ratelimited("ptp: physical clock is free running\n"); 100 100 return -EBUSY; 101 101 } 102 102