Hi all, Today's linux-next merge of the rust tree got a conflict in:
rust/kernel/drm/gem/mod.rs between commit: 917b10d90990 ("drm: rust: rename as_ref() to from_raw() for drm constructors") from the drm-misc tree and commit: 8802e1684378 ("rust: types: add Opaque::cast_from") 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/kernel/drm/gem/mod.rs index a24c9a2fc201,6f914ae0a5aa..000000000000 --- a/rust/kernel/drm/gem/mod.rs +++ b/rust/kernel/drm/gem/mod.rs @@@ -124,12 -124,10 +124,10 @@@ impl<T: DriverObject> IntoGEMObject fo self.obj.get() } - unsafe fn as_ref<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self { + unsafe fn from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self { - let self_ptr: *mut Opaque<bindings::drm_gem_object> = self_ptr.cast(); - // SAFETY: `obj` is guaranteed to be in an `Object<T>` via the safety contract of this // function - unsafe { &*crate::container_of!(self_ptr, Object<T>, obj) } + unsafe { &*crate::container_of!(Opaque::cast_from(self_ptr), Object<T>, obj) } } }
pgpNCVwfMlam9.pgp
Description: OpenPGP digital signature