Date: Wed, 22 Apr 2026 21:08:17 +0000 From: Bjoern A. Zeeb <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org> Subject: git: 01bb12ee7193 - stable/15 - linuxkpi: Add WARN_RATELIMIT() Message-ID: <69e938c1.27b43.7aecedc9@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=01bb12ee7193861f9026d941097eb6c239c92fe3 commit 01bb12ee7193861f9026d941097eb6c239c92fe3 Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> AuthorDate: 2025-08-12 23:14:52 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2026-04-22 20:56:57 +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 (cherry picked from commit 3942e85b992138056841cd7c96ea20436a66b740) --- 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?69e938c1.27b43.7aecedc9>
