Hi all,
Today's linux-next merge of the rust tree got a conflict in:
rust/macros/module.rs
between commit:
a4e3b76e4d5c ("rust: macros: enable use of hyphens in module names")
from the pm tree and commit:
de7cd3e4d638 ("rust: use absolute paths in macros referencing core and kernel")
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 c4afdd69e490,de9304498a97..000000000000
--- a/rust/macros/module.rs
+++ b/rust/macros/module.rs
@@@ -303,15 -302,15 +304,15 @@@ pub(crate) fn module(ts: TokenStream) -
#[doc(hidden)]
#[link_section = \"{initcall_section}\"]
#[used]
- pub static __{name}_initcall: extern \"C\" fn() -> ::kernel::ffi::c_int =
- __{name}_init;
+ pub static __{ident}_initcall: extern \"C\" fn() ->
- kernel::ffi::c_int = __{ident}_init;
++ ::kernel::ffi::c_int = __{ident}_init;
#[cfg(not(MODULE))]
#[cfg(CONFIG_HAVE_ARCH_PREL32_RELOCATIONS)]
- core::arch::global_asm!(
+ ::core::arch::global_asm!(
r#\".section \"{initcall_section}\", \"a\"
- __{name}_initcall:
- .long __{name}_init - .
+ __{ident}_initcall:
+ .long __{ident}_init - .
.previous
\"#
);
@@@ -319,7 -318,7 +320,7 @@@
#[cfg(not(MODULE))]
#[doc(hidden)]
#[no_mangle]
- pub extern \"C\" fn __{ident}_init() -> kernel::ffi::c_int {{
- pub extern \"C\" fn __{name}_init() -> ::kernel::ffi::c_int {{
++ pub extern \"C\" fn __{ident}_init() -> ::kernel::ffi::c_int {{
// SAFETY: This function is inaccessible to the outside due to the double
// module wrapping it. It is called exactly once by the C side via its
// placement above in the initcall section.
On Fri, May 23, 2025 at 8:20 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > 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. Looks OK to me, thanks! Cheers, Miguel
© 2016 - 2025 Red Hat, Inc.