Linux-Next discussions
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Greg KH <greg@kroah.com>, Arnd Bergmann <arnd@arndb.de>
Cc: Alice Ryhl <aliceryhl@google.com>, Gary Guo <gary@garyguo.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>
Subject: linux-next: manual merge of the char-misc tree with the rust tree
Date: Thu, 15 Oct 2026 15:33:34 +0100	[thread overview]
Message-ID: <atDkPrlfMSiLi5XW@sirena.org.uk> (raw)

[-- 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 --]

             reply	other threads:[~2026-10-15 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 14:33 Mark Brown [this message]
2026-10-15 17:24 ` linux-next: manual merge of the char-misc tree with the rust tree 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atDkPrlfMSiLi5XW@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=arnd@arndb.de \
    --cc=gary@garyguo.net \
    --cc=greg@kroah.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ojeda@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox