From: Alban Kurti <kurti@invicto.ai>
To: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Jonathan Corbet" <corbet@lwn.net>,
"David Gow" <davidgow@google.com>,
"Dirk Behme" <dirk.behme@de.bosch.com>,
"Asahi Lina" <lina@asahilina.net>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Wedson Almeida Filho" <walmeida@microsoft.com>,
"Andreas Hindborg (Samsung)" <nmi@metaspace.dk>,
"Tejun Heo" <tj@kernel.org>, "Fiona Behrens" <me@kloenk.dev>,
"Vincenzo Palazzo" <vincenzopalazzodev@gmail.com>,
"Xiangfei Ding" <dingxiangfei2009@gmail.com>
Cc: rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, Alban Kurti <kurti@invicto.ai>,
Martin Rodriguez Reboredo <yakoyoku@gmail.com>,
Fox Chen <foxhlchen@gmail.com>
Subject: [PATCH v3 4/6] rust: sync: add missing newline in locked_by log example
Date: Thu, 06 Feb 2025 21:07:55 +0000 (UTC) [thread overview]
Message-ID: <20250206-printing_fix-v3-4-a85273b501ae@invicto.ai> (raw)
In-Reply-To: <20250206-printing_fix-v3-0-a85273b501ae@invicto.ai>
The pr_info! example in rust/kernel/sync/locked_by.rs was missing
a newline. This patch appends the missing newline to ensure
that log messages for locked resources display correctly.
Fixes: 7b1f55e3a984 ("rust: sync: introduce `LockedBy`")
Reported-by: Miguel Ojeda <ojeda@kernel.org>
Closes: https://github.com/Rust-for-Linux/linux/issues/1139
Signed-off-by: Alban Kurti <kurti@invicto.ai>
---
rust/kernel/sync/locked_by.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/sync/locked_by.rs b/rust/kernel/sync/locked_by.rs
index a7b244675c2b96a36a6fe2e3ddd9a68e6ea01cb7..61f100a45b3507c750c1e3c405f9a8f67ced5346 100644
--- a/rust/kernel/sync/locked_by.rs
+++ b/rust/kernel/sync/locked_by.rs
@@ -55,7 +55,7 @@
/// fn print_bytes_used(dir: &Directory, file: &File) {
/// let guard = dir.inner.lock();
/// let inner_file = file.inner.access(&guard);
-/// pr_info!("{} {}", guard.bytes_used, inner_file.bytes_used);
+/// pr_info!("{} {}\n", guard.bytes_used, inner_file.bytes_used);
/// }
///
/// /// Increments `bytes_used` for both the directory and file.
--
2.48.1
next prev parent reply other threads:[~2025-02-06 21:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 21:07 [PATCH v3 0/6] rust: treewide: add missing newlines to printing calls Alban Kurti
2025-02-06 21:07 ` [PATCH v3 1/6] rust: docs: add missing newline to printing macro examples Alban Kurti
2025-02-07 7:37 ` David Gow
2025-02-06 21:07 ` [PATCH v3 2/6] rust: error: add missing newline to pr_warn! calls Alban Kurti
2025-02-06 21:07 ` [PATCH v3 3/6] rust: init: add missing newline to pr_info! calls Alban Kurti
2025-02-06 21:07 ` Alban Kurti [this message]
2025-02-06 21:07 ` [PATCH v3 5/6] rust: workqueue: add missing newline to pr_info! examples Alban Kurti
2025-02-07 9:36 ` Alice Ryhl
2025-02-06 21:07 ` [PATCH v3 6/6] rust: samples: add missing newline to pr_info! calls in rust_print_main Alban Kurti
2025-03-05 23:55 ` Miguel Ojeda
2025-04-13 20:52 ` Miguel Ojeda
2025-03-06 19:46 ` [PATCH v3 0/6] rust: treewide: add missing newlines to printing calls Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250206-printing_fix-v3-4-a85273b501ae@invicto.ai \
--to=kurti@invicto.ai \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=corbet@lwn.net \
--cc=davidgow@google.com \
--cc=dingxiangfei2009@gmail.com \
--cc=dirk.behme@de.bosch.com \
--cc=foxhlchen@gmail.com \
--cc=gary@garyguo.net \
--cc=lina@asahilina.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@kloenk.dev \
--cc=nmi@metaspace.dk \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tj@kernel.org \
--cc=tmgross@umich.edu \
--cc=vincenzopalazzodev@gmail.com \
--cc=walmeida@microsoft.com \
--cc=wedsonaf@gmail.com \
--cc=yakoyoku@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).