Re: [GIT PULL] Rust for 6.13

From: Miguel Ojeda
Date: Tue Nov 26 2024 - 19:19:56 EST


On Tue, Nov 26, 2024 at 11:08 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Well, please humor me. My conflict resolution isn't identical to
> linux-next, and my rust is still very much "monkey see, monkey do", so
> you should most definitely check it out.

It builds fine -- both after the vfs pid_namespace and after the rust one.

...except rustfmt wants to move the `use` imports a bit in
rust/kernel/task.rs. Do you prefer a quick patch, or do you want to
run `make rustfmt` on your end?

Doing the latter would leave you with what linux-next has for those
`use`s. You can also move the `ffi::...` one inside the `crate::...`
import and run `rustfmt` which makes it look a bit more consistent:

use crate::{
bindings,
ffi::{c_int, c_long, c_uint},
pid_namespace::PidNamespace,
types::{ARef, NotThreadSafe, Opaque},
};
use core::{
cmp::{Eq, PartialEq},
ops::Deref,
ptr,
};

Thanks!

Cheers,
Miguel