[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250613-ptp-v1-1-ee44260ce9e2@debian.org>
Date: Fri, 13 Jun 2025 10:15:46 -0700
From: Breno Leitao <leitao@...ian.org>
To: Richard Cochran <richardcochran@...il.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...a.com, Breno Leitao <leitao@...ian.org>
Subject: [PATCH net-next] 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@...ian.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@...ian.org>
Powered by blists - more mailing lists