"Danilo Krummrich" <[email protected]> writes: > On Tue Mar 24, 2026 at 3:00 PM CET, Andreas Hindborg wrote: >>> + /// Same as [`Coherent::zeroed`], but instead of a zero-initialization >>> the memory is initialized >>> + /// with `init`. >>> + #[inline] >>> + pub fn init<E>( >>> + dev: &device::Device<Bound>, >>> + gfp_flags: kernel::alloc::Flags, >>> + init: impl Init<T, E>, >>> + ) -> Result<Self> >>> + where >>> + Error: From<E>, >>> + { >>> + Self::init_with_attrs(dev, gfp_flags, Attrs(0), init) >>> + } >>> + >> >> I think we are missing an array initializer for `Coherent<[T]>`. > > This method is already compatible with arrays, T can be an array type itself, > e.g. T = [MyStruct; 5]. > > For instance, the diff in [1] should work.
Cool! >> Reviewed-by: Andreas Hindborg <[email protected]> > > Thanks! The patch series has been applied yesterday, and the branch it has > been > applied to is immutable, so I can't add additional tags. You guys move fast! > However, the Link: included in the patch still points to this conversation. > > Also note that subsequent review is still valued; we can always send follow-up > patches if required. At any rate I can send the changes I suggested if they are deemed valid. Best regards, Andreas Hindborg
