Hi all, Today's linux-next merge of the rust tree got a conflict in: rust/kernel/device_id.rs between commit: 8d84b32075fb ("rust: device_id: split out index support into a separate trait") from the driver-core tree and commit: 5e30550558b1 ("rust: enable `clippy::as_underscore` lint") 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/device_id.rs index 8ed2c946144c,3dc72ca8cfc2..000000000000 --- a/rust/kernel/device_id.rs +++ b/rust/kernel/device_id.rs @@@ -94,16 -77,14 +94,16 @@@ impl() - .write(i); + if let Some(data_offset) = data_offset { + // SAFETY: by the safety requirement of this function, this would be effectively + // `raw_ids[i].driver_data = i;`. + unsafe { + raw_ids[i] + .as_mut_ptr() - .byte_offset(data_offset as _) ++ .byte_add(data_offset) + .cast::() + .write(i); + } } // SAFETY: this is effectively a move: `infos[i] = ids[i].1`. We make a copy here but