rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] rust: Add pr_*_once macros
@ 2024-11-09 20:30 Jens Korinth via B4 Relay
  2024-11-09 20:30 ` [PATCH v3 1/3] rust: print: Add do_once_lite macro Jens Korinth via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Jens Korinth via B4 Relay @ 2024-11-09 20:30 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross
  Cc: rust-for-linux, FUJITA Tomonori, Dirk Behme, Jens Korinth

Add Rust version of pr_[emerg|alert|crit|err|warn|notic|info]_once
functions, which print a message only once.

v3:
- Fix rustdoc error, formatting issues
- Fix missing Signed-off-by
v2: https://lore.kernel.org/r/20241107-pr_once_macros-v2-0-dc0317ff301e@tuta.io
- Split patch into do_once_lite part and pr_*_once macros
- Add macro rule for call without condition => renamed to do_once_lite
- Used condition-less call in pr_*_once macros
- Added examples
- Removed TODO in kernel/error.rs using pr_warn_once
v1: https://lore.kernel.org/rust-for-linux/20241106.083113.356536037967804464.fujita.tomonori@gmail.com/

Co-developed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Jens Korinth <jens.korinth@tuta.io>
---
FUJITA Tomonori (1):
      rust: print: Add pr_*_once macros

Jens Korinth (2):
      rust: print: Add do_once_lite macro
      rust: error: Replace pr_warn by pr_warn_once

 rust/kernel/error.rs |   3 +-
 rust/kernel/print.rs | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 161 insertions(+), 2 deletions(-)
---
base-commit: ae7851c29747fa3765ecb722fe722117a346f988
change-id: 20241107-pr_once_macros-6438e6f5b923

Best regards,
-- 
Jens Korinth <jens.korinth@tuta.io>



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

end of thread, other threads:[~2024-11-11 17:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-09 20:30 [PATCH v3 0/3] rust: Add pr_*_once macros Jens Korinth via B4 Relay
2024-11-09 20:30 ` [PATCH v3 1/3] rust: print: Add do_once_lite macro Jens Korinth via B4 Relay
2024-11-09 20:41   ` Miguel Ojeda
2024-11-09 21:33     ` jens.korinth
2024-11-09 21:44       ` Miguel Ojeda
2024-11-09 22:56   ` Boqun Feng
2024-11-10  7:45     ` jens.korinth
2024-11-10 19:23       ` Boqun Feng
2024-11-11  9:17     ` Alice Ryhl
2024-11-11 13:34       ` jens.korinth
2024-11-11 13:53         ` Alice Ryhl
2024-11-11 17:46           ` Boqun Feng
2024-11-09 20:30 ` [PATCH v3 2/3] rust: print: Add pr_*_once macros Jens Korinth via B4 Relay
2024-11-09 20:30 ` [PATCH v3 3/3] rust: error: Replace pr_warn by pr_warn_once Jens Korinth via B4 Relay
2024-11-11  7:05 ` [PATCH v3 0/3] rust: Add pr_*_once macros Dirk Behme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).