[PATCH v3 1/6] rust: docs: add missing newline to printing macro examples

Alban Kurti posted 6 patches 1 year ago
[PATCH v3 1/6] rust: docs: add missing newline to printing macro examples
Posted by Alban Kurti 1 year ago
Fix adding a newline at the end of the usage of pr_info! in the
documentation

Fixes: e3c3d34507c7 ("docs: rust: Add description of Rust documentation test as KUnit ones")
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>
---
 Documentation/rust/testing.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/rust/testing.rst b/Documentation/rust/testing.rst
index 568b71b415a4525772cb77ce76c7f9da32fac1c4..180b886e0f1ee997779f04ce85eba858e64946c0 100644
--- a/Documentation/rust/testing.rst
+++ b/Documentation/rust/testing.rst
@@ -97,7 +97,7 @@ operator are also supported as usual, e.g.:
 
 	/// ```
 	/// # use kernel::{spawn_work_item, workqueue};
-	/// spawn_work_item!(workqueue::system(), || pr_info!("x"))?;
+	/// spawn_work_item!(workqueue::system(), || pr_info!("x\n"))?;
 	/// # Ok::<(), Error>(())
 	/// ```
 

-- 
2.48.1
Re: [PATCH v3 1/6] rust: docs: add missing newline to printing macro examples
Posted by David Gow 1 year ago
On Fri, 7 Feb 2025 at 05:08, Alban Kurti <kurti@invicto.ai> wrote:
>
> Fix adding a newline at the end of the usage of pr_info! in the
> documentation
>
> Fixes: e3c3d34507c7 ("docs: rust: Add description of Rust documentation test as KUnit ones")
> 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>
> ---

Looks fine to me as a fix for the KUnit/testing docs.

Reviewed-by: David Gow <davidgow@google.com>

Cheers,
-- David

>  Documentation/rust/testing.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/rust/testing.rst b/Documentation/rust/testing.rst
> index 568b71b415a4525772cb77ce76c7f9da32fac1c4..180b886e0f1ee997779f04ce85eba858e64946c0 100644
> --- a/Documentation/rust/testing.rst
> +++ b/Documentation/rust/testing.rst
> @@ -97,7 +97,7 @@ operator are also supported as usual, e.g.:
>
>         /// ```
>         /// # use kernel::{spawn_work_item, workqueue};
> -       /// spawn_work_item!(workqueue::system(), || pr_info!("x"))?;
> +       /// spawn_work_item!(workqueue::system(), || pr_info!("x\n"))?;
>         /// # Ok::<(), Error>(())
>         /// ```
>
>
> --
> 2.48.1
>