linux-next: manual merge of the char-misc tree with the rust tree
Subsystems (3)
Mark Brown
maintainerHi all,
Today's linux-next merge of the char-misc tree got a conflict in:
rust/kernel/miscdevice.rs
between commit:
a4082121eeb5c ("rust: miscdevice: use #[optional] attribute of #[vtable] macro")
from the rust tree and commit:
ba9d2c7ea7f8f ("rust: miscdevice: add registration data to MiscDevice")
from the char-misc tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
rust/kernel/miscdevice.rs +0 -0
@@@ -10,8 -10,12 +10,9 @@@ use crate::{ bindings, + container_of, device::Device, - error::{ - to_result, - VTABLE_DEFAULT_ERROR, // - }, + error::to_result, fs::{ File, Kiocb, // /// the VMA initialization by calling methods of `vma`. If the function does not return an /// error, the kernel will complete initialization of the VMA according to the properties of /// `vma`. + #[optional] fn mmap( - _device: <Self::Ptr as ForeignOwnable>::Borrowed<'_>, + _device: <Self::File as ForeignOwnable>::Borrowed<'_>, _file: &File, _vma: &VmaNew, - ) -> Result { - build_error!(VTABLE_DEFAULT_ERROR) - } + ) -> Result; /// Read from this miscdevice. - fn read_iter(_kiocb: Kiocb<'_, Self::File>, _iov: &mut IovIterDest<'_>) -> Result<usize> { - build_error!(VTABLE_DEFAULT_ERROR) - } + #[optional] - fn read_iter(_kiocb: Kiocb<'_, Self::Ptr>, _iov: &mut IovIterDest<'_>) -> Result<usize>; ++ fn read_iter(_kiocb: Kiocb<'_, Self::File>, _iov: &mut IovIterDest<'_>) -> Result<usize>; /// Write to this miscdevice. - fn write_iter(_kiocb: Kiocb<'_, Self::File>, _iov: &mut IovIterSource<'_>) -> Result<usize> { - build_error!(VTABLE_DEFAULT_ERROR) - } + #[optional] - fn write_iter(_kiocb: Kiocb<'_, Self::Ptr>, _iov: &mut IovIterSource<'_>) -> Result<usize>; ++ fn write_iter(_kiocb: Kiocb<'_, Self::File>, _iov: &mut IovIterSource<'_>) -> Result<usize>; /// Handler for ioctls. /// /// The `cmd` argument is usually manipulated using the utilities in [`kernel::ioctl`]. /// /// [`kernel::ioctl`]: mod@crate::ioctl + #[optional] fn ioctl( - _device: <Self::Ptr as ForeignOwnable>::Borrowed<'_>, + _device: <Self::File as ForeignOwnable>::Borrowed<'_>, _file: &File, _cmd: u32, _arg: usize, /// that have different layout on 32-bit and 64-bit userspace. If no implementation is /// provided, then `compat_ptr_ioctl` will be used instead. #[cfg(CONFIG_COMPAT)] + #[optional] fn compat_ioctl( - _device: <Self::Ptr as ForeignOwnable>::Borrowed<'_>, + _device: <Self::File as ForeignOwnable>::Borrowed<'_>, _file: &File, _cmd: u32, _arg: usize, - ) -> Result<isize> { - build_error!(VTABLE_DEFAULT_ERROR) - } + ) -> Result<isize>; /// Show info for this fd. + #[optional] fn show_fdinfo( - _device: <Self::Ptr as ForeignOwnable>::Borrowed<'_>, + _device: <Self::File as ForeignOwnable>::Borrowed<'_>, _m: &SeqFile, _file: &File, - ) { - build_error!(VTABLE_DEFAULT_ERROR) - } + ); } /// A vtable for the file operations of a Rust miscdevice.
Quoted 9 lines · Mark Brown
Today's linux-next merge of the char-misc tree got a conflict in:
rust/kernel/miscdevice.rsbetween commit:
a4082121eeb5c("rust: miscdevice: use#[optional]attribute of#[vtable]macro")
Quoted 7 lines
from the rust tree and commit:
ba9d2c7ea7f8f("rust: miscdevice: add registration data to MiscDevice")from the char-misc tree.
I fixed it up (see below) and can carry the fix as necessary. This
Looks good, thanks Mark.
Cheers,
Miguel