Linux-Next discussions
 help / color / mirror / Atom feed
* linux-next: manual merge of the char-misc tree with the rust tree
@ 2026-10-15 14:33 Mark Brown
  2026-10-15 17:24 ` Miguel Ojeda
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2026-10-15 14:33 UTC (permalink / raw)
  To: Greg KH, Arnd Bergmann
  Cc: Alice Ryhl, Gary Guo, Greg Kroah-Hartman,
	Linux Kernel Mailing List, Linux Next Mailing List, Miguel Ojeda

[-- Attachment #1: Type: text/plain, Size: 4001 bytes --]

Hi 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.

diff --cc rust/kernel/miscdevice.rs
index eacea29e3fb07,ecc142a1b7ea2..0000000000000
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@@ -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, //
@@@ -142,29 -180,31 +177,29 @@@ pub trait MiscDevice: Sized + Sync 
      /// 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,
@@@ -178,21 -220,23 +213,21 @@@
      /// 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* linux-next: manual merge of the char-misc tree with the rust tree
@ 2026-08-11 15:15 Mark Brown
  2026-08-11 16:22 ` Carlos Llamas
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2026-08-11 15:15 UTC (permalink / raw)
  To: Greg KH, Arnd Bergmann
  Cc: Alice Ryhl, Carlos Llamas, Greg Kroah-Hartman,
	Linux Kernel Mailing List, Linux Next Mailing List, Miguel Ojeda,
	Mukesh Kumar Chaurasiya

[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]

Hi all,

Today's linux-next merge of the char-misc tree got a conflict in:

  rust/uapi/uapi_helper.h

between commit:

  cdfcaa36ac93a ("rust: uapi: replace direct asm-generic/ioctl.h include with linux/ioctl.h")

from the rust tree and commit:

  f14e0c8183bc7 ("rust_binder: report netlink transactions")

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.

diff --cc include/uapi/linux/kvm.h
index 70e36e6a0ad4b,9fc8dfdfd65ff..0000000000000
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@@ -997,7 -997,7 +997,8 @@@ struct kvm_enable_cap 
  #define KVM_CAP_S390_KEYOP 247
  #define KVM_CAP_S390_VSIE_ESAMODE 248
  #define KVM_CAP_S390_HPAGE_2G 249
 -#define KVM_CAP_ARM_PMU_V3_STRICT 250
 +#define KVM_CAP_PPC_COMPAT_CAPS 250
++#define KVM_CAP_ARM_PMU_V3_STRICT 251
  
  struct kvm_irq_routing_irqchip {
  	__u32 irqchip;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-15 17:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 14:33 linux-next: manual merge of the char-misc tree with the rust tree Mark Brown
2026-10-15 17:24 ` Miguel Ojeda
  -- strict thread matches above, loose matches on Subject: below --
2026-08-11 15:15 Mark Brown
2026-08-11 16:22 ` Carlos Llamas
2026-08-11 17:02   ` Mark Brown
2026-08-12  7:30     ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox