From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Miguel Ojeda <ojeda@kernel•org>, Greg KH <greg@kroah•com>,
Arnd Bergmann <arnd@arndb•de>
Cc: Danilo Krummrich <dakr@kernel•org>, 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>,
Wedson Almeida Filho <walmeida@microsoft•com>
Subject: linux-next: manual merge of the rust tree with the char-misc tree
Date: Mon, 11 Nov 2024 17:34:59 +1100 [thread overview]
Message-ID: <20241111173459.2646d4af@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2730 bytes --]
Hi all,
Today's linux-next merge of the rust tree got a conflict in:
rust/macros/module.rs
between commit:
7f15c46a57c3 ("rust: introduce `InPlaceModule`")
from the char-misc tree and commit:
d072acda4862 ("rust: use custom FFI integer types")
from the rust 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.
--
Cheers,
Stephen Rothwell
diff --cc rust/macros/module.rs
index a03266a78cfb,e7a087b7e884..000000000000
--- a/rust/macros/module.rs
+++ b/rust/macros/module.rs
@@@ -332,15 -330,21 +332,15 @@@ pub(crate) fn module(ts: TokenStream) -
/// # Safety
///
/// This function must only be called once.
- unsafe fn __init() -> core::ffi::c_int {{
+ unsafe fn __init() -> kernel::ffi::c_int {{
- match <{type_} as kernel::Module>::init(&super::super::THIS_MODULE) {{
- Ok(m) => {{
- // SAFETY: No data race, since `__MOD` can only be accessed by this
- // module and there only `__init` and `__exit` access it. These
- // functions are only called once and `__exit` cannot be called
- // before or during `__init`.
- unsafe {{
- __MOD = Some(m);
- }}
- return 0;
- }}
- Err(e) => {{
- return e.to_errno();
- }}
+ let initer =
+ <{type_} as kernel::InPlaceModule>::init(&super::super::THIS_MODULE);
+ // SAFETY: No data race, since `__MOD` can only be accessed by this module
+ // and there only `__init` and `__exit` access it. These functions are only
+ // called once and `__exit` cannot be called before or during `__init`.
+ match unsafe {{ initer.__pinned_init(__MOD.as_mut_ptr()) }} {{
+ Ok(m) => 0,
+ Err(e) => e.to_errno(),
}}
}}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2024-11-11 6:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 6:34 Stephen Rothwell [this message]
2024-11-11 14:54 ` linux-next: manual merge of the rust tree with the char-misc tree Greg KH
2024-11-11 23:56 ` Miguel Ojeda
2024-11-28 1:48 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2022-05-16 7:13 Stephen Rothwell
2022-05-16 7:49 ` Greg KH
2022-05-16 8:18 ` Miguel Ojeda
2022-05-16 8:27 ` Greg KH
2021-04-16 7:58 Stephen Rothwell
2021-04-16 8:10 ` Greg KH
2021-04-16 8:26 ` Stephen Rothwell
2021-04-16 12:31 ` 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=20241111173459.2646d4af@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=arnd@arndb$(echo .)de \
--cc=dakr@kernel$(echo .)org \
--cc=gary@garyguo$(echo .)net \
--cc=greg@kroah$(echo .)com \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=ojeda@kernel$(echo .)org \
--cc=walmeida@microsoft$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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