Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v1 0/2] rust: bug: add warn_once macro
@ 2026-10-03 12:39 FUJITA Tomonori
  2026-10-03 12:39 ` [PATCH v1 1/2] rust: bug: document when to use the WARN macros FUJITA Tomonori
  2026-10-03 12:39 ` [PATCH v1 2/2] rust: bug: add warn_once macro FUJITA Tomonori
  0 siblings, 2 replies; 4+ messages in thread
From: FUJITA Tomonori @ 2026-10-03 12:39 UTC (permalink / raw)
  To: ojeda
  Cc: a.hindborg, acourbot, aliceryhl, bjorn3_gh, boqun, dakr,
	daniel.almeida, gary, lossin, tamird, tmgross, work,
	rust-for-linux, FUJITA Tomonori

From: FUJITA Tomonori <fujita.tomonori@gmail.com>

This series adds `warn_once!`, the Rust version of C `WARN_ONCE()`.

Patch 1 documents when to use the WARN macros, based on the comment in
include/asm-generic/bug.h. Patch 2 adds `warn_once!`.

Miguel, patch 2 moves the UML `warn_slowpath_fmt()` call into
`warn_slowpath()` and updates its SAFETY comment, so [1] can be dropped
if this series is applied.

[1] https://lore.kernel.org/rust-for-linux/20261002104550.2877930-1-tomo@flapping.org/

FUJITA Tomonori (2):
  rust: bug: document when to use the WARN macros
  rust: bug: add warn_once macro

 rust/helpers/bug.c |  11 ++++
 rust/kernel/bug.rs | 134 +++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 135 insertions(+), 10 deletions(-)


base-commit: d52549881e6777fdcc79a349028413b182a641d2
-- 
2.43.0


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

end of thread, other threads:[~2026-10-04  8:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03 12:39 [PATCH v1 0/2] rust: bug: add warn_once macro FUJITA Tomonori
2026-10-03 12:39 ` [PATCH v1 1/2] rust: bug: document when to use the WARN macros FUJITA Tomonori
2026-10-04  8:08   ` Andreas Hindborg
2026-10-03 12:39 ` [PATCH v1 2/2] rust: bug: add warn_once macro FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox