All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] rust: Add pr_*_once macros
@ 2024-11-06 23:28 ` Jens Korinth via B4 Relay
  0 siblings, 0 replies; 14+ messages in thread
From: Jens Korinth @ 2024-11-06 23:28 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.

v2:
- 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/

Signed-off-by: Jens Korinth <jens.korinth@tuta.io>
Co-developed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
---
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 | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 144 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] 14+ messages in thread

end of thread, other threads:[~2024-11-08 20:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06 23:28 [PATCH v2 0/3] rust: Add pr_*_once macros Jens Korinth
2024-11-06 23:28 ` Jens Korinth via B4 Relay
2024-11-06 23:28 ` [PATCH v2 1/3] rust: print: Add do_once_lite macro Jens Korinth
2024-11-06 23:28   ` Jens Korinth via B4 Relay
2024-11-06 23:28 ` [PATCH v2 2/3] rust: print: Add pr_*_once macros Jens Korinth
2024-11-06 23:28   ` Jens Korinth via B4 Relay
2024-11-07 11:14   ` Miguel Ojeda
2024-11-08 12:09     ` FUJITA Tomonori
2024-11-08 20:10     ` jens.korinth
2024-11-08 20:25       ` Miguel Ojeda
2024-11-07 14:29   ` kernel test robot
2024-11-08 12:21   ` Dirk Behme
2024-11-06 23:28 ` [PATCH v2 3/3] rust: error: Replace pr_warn by pr_warn_once Jens Korinth
2024-11-06 23:28   ` Jens Korinth via B4 Relay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.