Date: Wed, 07 Jan 2026 21:50:29 +0000 From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 3942e85b9921 - main - linuxkpi: Add WARN_RATELIMIT() Message-ID: <695ed525.deb0.3b40a993@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=3942e85b992138056841cd7c96ea20436a66b740 commit 3942e85b992138056841cd7c96ea20436a66b740 Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> AuthorDate: 2025-08-12 23:14:52 +0000 Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> CommitDate: 2026-01-07 21:38:40 +0000 linuxkpi: Add WARN_RATELIMIT() The i915 DRM driver started to use it in Linux 6.10. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54493 --- sys/compat/linuxkpi/common/include/linux/ratelimit.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ratelimit.h b/sys/compat/linuxkpi/common/include/linux/ratelimit.h index 9585b4b994d7..fdef57c7882d 100644 --- a/sys/compat/linuxkpi/common/include/linux/ratelimit.h +++ b/sys/compat/linuxkpi/common/include/linux/ratelimit.h @@ -14,4 +14,11 @@ struct ratelimit_state { #define ratelimit_state_init(x, y, z) #define ratelimit_set_flags(x, y) +#define WARN_RATELIMIT(condition, ...) ({ \ + bool __ret_warn_on = (condition); \ + if (unlikely(__ret_warn_on)) \ + pr_warn_ratelimited(__VA_ARGS__); \ + unlikely(__ret_warn_on); \ +}) + #endifhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695ed525.deb0.3b40a993>
