[PATCH 2/4] rust: cpufreq: import pin_init::zeroed() from ffi

Alice Ryhl posted 4 patches 1 week, 5 days ago
[PATCH 2/4] rust: cpufreq: import pin_init::zeroed() from ffi
Posted by Alice Ryhl 1 week, 5 days ago
The zeroed() helper was re-exported from the ffi crate. As this usage of
zeroed() has nothing to do with pin-init, use the new re-export.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
 rust/kernel/cpufreq.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/cpufreq.rs b/rust/kernel/cpufreq.rs
index f968fbd22890546db1758d921e3374359ef9d00b..fadba8e669be33911a30be0254d3d4dcba9f4226 100644
--- a/rust/kernel/cpufreq.rs
+++ b/rust/kernel/cpufreq.rs
@@ -1012,7 +1012,7 @@ impl<T: Driver> Registration<T> {
         } else {
             None
         },
-        ..pin_init::zeroed()
+        ..ffi::zeroed()
     };
 
     const fn copy_name(name: &'static CStr) -> [c_char; CPUFREQ_NAME_LEN] {

-- 
2.52.0.457.g6b5491de43-goog
Re: [PATCH 2/4] rust: cpufreq: import pin_init::zeroed() from ffi
Posted by Viresh Kumar 1 week, 5 days ago
On 26-01-26, 13:05, Alice Ryhl wrote:
> The zeroed() helper was re-exported from the ffi crate. As this usage of
> zeroed() has nothing to do with pin-init, use the new re-export.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
>  rust/kernel/cpufreq.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rust/kernel/cpufreq.rs b/rust/kernel/cpufreq.rs
> index f968fbd22890546db1758d921e3374359ef9d00b..fadba8e669be33911a30be0254d3d4dcba9f4226 100644
> --- a/rust/kernel/cpufreq.rs
> +++ b/rust/kernel/cpufreq.rs
> @@ -1012,7 +1012,7 @@ impl<T: Driver> Registration<T> {
>          } else {
>              None
>          },
> -        ..pin_init::zeroed()
> +        ..ffi::zeroed()
>      };
>  
>      const fn copy_name(name: &'static CStr) -> [c_char; CPUFREQ_NAME_LEN] {

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh