Patch "rust: error: Rename to_kernel_errno() -> to_errno()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rust: error: Rename to_kernel_errno() -> to_errno()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rust-error-rename-to_kernel_errno-to_errno.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 46384d0990bf99ed8b597e8794ea581e2a647710 Mon Sep 17 00:00:00 2001
From: Asahi Lina <lina@xxxxxxxxxxxxx>
Date: Mon, 3 Apr 2023 18:48:10 +0900
Subject: rust: error: Rename to_kernel_errno() -> to_errno()

From: Asahi Lina <lina@xxxxxxxxxxxxx>

commit 46384d0990bf99ed8b597e8794ea581e2a647710 upstream.

This is kernel code, so specifying "kernel" is redundant. Let's simplify
things and just call it to_errno().

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>
Signed-off-by: Asahi Lina <lina@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20230224-rust-error-v3-1-03779bddc02b@xxxxxxxxxxxxx
Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 rust/kernel/error.rs  |    2 +-
 rust/macros/module.rs |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -25,7 +25,7 @@ pub struct Error(core::ffi::c_int);
 
 impl Error {
     /// Returns the kernel error code.
-    pub fn to_kernel_errno(self) -> core::ffi::c_int {
+    pub fn to_errno(self) -> core::ffi::c_int {
         self.0
     }
 }
--- a/rust/macros/module.rs
+++ b/rust/macros/module.rs
@@ -258,7 +258,7 @@ pub(crate) fn module(ts: TokenStream) ->
                         return 0;
                     }}
                     Err(e) => {{
-                        return e.to_kernel_errno();
+                        return e.to_errno();
                     }}
                 }}
             }}


Patches currently in stable-queue which might be from lina@xxxxxxxxxxxxx are

queue-6.1/rust-error-rename-to_kernel_errno-to_errno.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux