From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B40B25F797; Tue, 10 Jun 2025 09:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749549350; cv=none; b=kE8bnT3nki7z5cA/r+MJGap1KYFmB0KxIokZv8KUTxWf/HmZWv8rujZ4CdwPmUygZ2fptPboXOs4Fk8gZGVXl9ZoOHYsLgBu0F31moCDMk2Tn1Hd09AI7tL41oN81ru4D5uQphVEmHT5hEyDh6833eLXZzDGt/ZU9mwPedbeGvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749549350; c=relaxed/simple; bh=GqfnxPzPcKC6JM544VAwehfJVCxORTUdatZW3VeOt3o=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=K1IoMSozkOteyC3uuiN53FWwTmdySuvinV/pg2/Gf7IdumXVqFZZKWj4FhbxoBIiGalU4RXwaqaunM5a1j7cM3Rj0mZgm/EMNGlVAE5U8pG2EXkvsa1e9Sf0sRVENry3G3DOWKhQZ8UUCt535dPzg0TH60cpBlwD432Ub5ED8kg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tgKap9aI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tgKap9aI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00EB3C4CEF2; Tue, 10 Jun 2025 09:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749549350; bh=GqfnxPzPcKC6JM544VAwehfJVCxORTUdatZW3VeOt3o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tgKap9aI2hGdFjN6WUUSKUHHZoUGyCh8mjzpcWGjuYvEhA6xPw68JB1V/3HaASgtH ija2jwIScaIQRR/e4Nd3EQ4KpVRqMHHlJXCiiwUdgS13XtoOjUF9Tzhw+dIqNOxHuq u6lFrweoCCa2k5ffAAISpD3BPjWw+lv+5zNmQEG29zpsithoCSn5bQeswUnBMa6uii RpjgGato4S6ybVW4Jloxom4UQxf4QMVS/mys7pbUA+KUgVqS/LXCzLzgYPWQxWA+nz wxItHQs6FoSbB5bhXvIV+xfmSaHpYRrZCM4wMIvdekf5jymzDl6atJm3GiinhA4zZy 8Dd+XBP26h2fw== Precedence: bulk X-Mailing-List: linux-next@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 10 Jun 2025 11:55:47 +0200 Message-Id: From: "Benno Lossin" To: "Andreas Hindborg" Cc: "Stephen Rothwell" , "Miguel Ojeda" , "Linux Kernel Mailing List" , "Linux Next Mailing List" Subject: Re: linux-next: build failure after merge of the rust-pin-init tree X-Mailer: aerc 0.20.1 References: <20250610142230.001af1d3@canb.auug.org.au> <87msag2b8r.fsf@kernel.org> In-Reply-To: <87msag2b8r.fsf@kernel.org> On Tue Jun 10, 2025 at 11:32 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: > >> On Tue Jun 10, 2025 at 9:59 AM CEST, Benno Lossin wrote: >>> On Tue Jun 10, 2025 at 6:22 AM CEST, Stephen Rothwell wrote: >>>> Hi all, >>>> >>>> After merging the rust-pin-init tree, today's linux-next build (x86_64 >>>> allmodconfig) failed like this: >>>> >>>> error[E0282]: type annotations needed >>>> --> rust/kernel/configfs.rs:154:26 >>>> | >>>> 154 | subsystem <- pin_init::zeroed().chain( >>>> | ^^^^^^^^^^^^^^^^ cannot infer type of t= he type parameter `T` declared on the function `zeroed` >>>> | >>>> help: consider specifying the generic argument >>>> | >>>> 154 | subsystem <- pin_init::zeroed::().chain( >>>> | +++++ >>>> >>>> error[E0282]: type annotations needed >>>> --> rust/kernel/configfs.rs:264:22 >>>> | >>>> 264 | group <- pin_init::zeroed().chain(|v: &mut Opaque| { >>>> | ^^^^^^^^^^^^^^^^ cannot infer type of the t= ype parameter `T` declared on the function `zeroed` >>>> | >>>> help: consider specifying the generic argument >>>> | >>>> 264 | group <- pin_init::zeroed::().chain(|v: &mut Opaq= ue| { >>>> | +++++ >>>> >>>> error: aborting due to 2 previous errors >>>> >>>> For more information about this error, try `rustc --explain E0282`. >>>> >>>> Caused by commit >>>> >>>> 0bcaea04244b ("rust: pin-init: rename `zeroed` to `init_zeroed`") >>>> >>>> I have used the rust-pin-init tree from next-20250606 for today. >>> >>> Thanks for catching this! I didn't test with `CONFIG_CONFIGFS=3Dy`, so = the >>> code was cfg'd out... I'll add it to my tests. >>> >>> @Andreas I'll send a new version of the commit above with configfs >>> changed. >> >> (sorry forgot to add your emails and also some new info) >> >> Actually, the correct change would be this in commit 0bcaea04244b >> ("rust: pin-init: rename `zeroed` to `init_zeroed`"): >> >> diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs >> index 34d0bea4f9a5..6d566a8bde74 100644 >> --- a/rust/kernel/configfs.rs >> +++ b/rust/kernel/configfs.rs >> @@ -151,7 +151,7 @@ pub fn new( >> data: impl PinInit, >> ) -> impl PinInit { >> try_pin_init!(Self { >> - subsystem <- pin_init::zeroed().chain( >> + subsystem <- pin_init::init_zeroed().chain( >> |place: &mut Opaque| { >> // SAFETY: We initialized the required fields of `p= lace.group` above. >> unsafe { >> @@ -261,7 +261,7 @@ pub fn new( >> data: impl PinInit, >> ) -> impl PinInit { >> try_pin_init!(Self { >> - group <- pin_init::zeroed().chain(|v: &mut Opaque| { >> + group <- pin_init::init_zeroed().chain(|v: &mut Opaque| { >> let place =3D v.get(); >> let name =3D name.as_bytes_with_nul().as_ptr(); >> // SAFETY: It is safe to initialize a group once it has= been zeroed. >> >> @Miguel, @Andreas, how should I go about this? Send the commit above >> augmented with the diff, or send a patch with just the diff to the list? >> Or apply the diff directly to the commit in the pin-init-next branch & >> rebasing (potentially adding an Acked-by from Andreas)? Or some other >> way? > > I think you should add this change directly in your tree. I think you > should just fold it into the breaking commit so we avoid commits that do > not build. > > Acked-by: Andreas Hindborg Thanks and done! --- Cheers, Benno