* linux-next: build failure after merge of the rust-pin-init tree
@ 2025-06-10 4:22 Stephen Rothwell
2025-06-10 7:59 ` Benno Lossin
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2025-06-10 4:22 UTC (permalink / raw)
To: Benno Lossin; +Cc: Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]
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 the type parameter `T` declared on the function `zeroed`
|
help: consider specifying the generic argument
|
154 | subsystem <- pin_init::zeroed::<T>().chain(
| +++++
error[E0282]: type annotations needed
--> rust/kernel/configfs.rs:264:22
|
264 | group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
| ^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `zeroed`
|
help: consider specifying the generic argument
|
264 | group <- pin_init::zeroed::<T>().chain(|v: &mut Opaque<bindings::config_group>| {
| +++++
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.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the rust-pin-init tree
2025-06-10 4:22 linux-next: build failure after merge of the rust-pin-init tree Stephen Rothwell
@ 2025-06-10 7:59 ` Benno Lossin
2025-06-10 8:15 ` Benno Lossin
0 siblings, 1 reply; 6+ messages in thread
From: Benno Lossin @ 2025-06-10 7:59 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Linux Kernel Mailing List, Linux Next Mailing List
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 the type parameter `T` declared on the function `zeroed`
> |
> help: consider specifying the generic argument
> |
> 154 | subsystem <- pin_init::zeroed::<T>().chain(
> | +++++
>
> error[E0282]: type annotations needed
> --> rust/kernel/configfs.rs:264:22
> |
> 264 | group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
> | ^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `zeroed`
> |
> help: consider specifying the generic argument
> |
> 264 | group <- pin_init::zeroed::<T>().chain(|v: &mut Opaque<bindings::config_group>| {
> | +++++
>
> 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=y`, 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.
---
Cheers,
Benno
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the rust-pin-init tree
2025-06-10 7:59 ` Benno Lossin
@ 2025-06-10 8:15 ` Benno Lossin
2025-06-10 9:32 ` Andreas Hindborg
2025-06-10 9:56 ` Miguel Ojeda
0 siblings, 2 replies; 6+ messages in thread
From: Benno Lossin @ 2025-06-10 8:15 UTC (permalink / raw)
To: Stephen Rothwell, Miguel Ojeda, Andreas Hindborg
Cc: Linux Kernel Mailing List, Linux Next Mailing List
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 the type parameter `T` declared on the function `zeroed`
>> |
>> help: consider specifying the generic argument
>> |
>> 154 | subsystem <- pin_init::zeroed::<T>().chain(
>> | +++++
>>
>> error[E0282]: type annotations needed
>> --> rust/kernel/configfs.rs:264:22
>> |
>> 264 | group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
>> | ^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `zeroed`
>> |
>> help: consider specifying the generic argument
>> |
>> 264 | group <- pin_init::zeroed::<T>().chain(|v: &mut Opaque<bindings::config_group>| {
>> | +++++
>>
>> 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=y`, 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<Data, Error>,
) -> impl PinInit<Self, Error> {
try_pin_init!(Self {
- subsystem <- pin_init::zeroed().chain(
+ subsystem <- pin_init::init_zeroed().chain(
|place: &mut Opaque<bindings::configfs_subsystem>| {
// SAFETY: We initialized the required fields of `place.group` above.
unsafe {
@@ -261,7 +261,7 @@ pub fn new(
data: impl PinInit<Data, Error>,
) -> impl PinInit<Self, Error> {
try_pin_init!(Self {
- group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
+ group <- pin_init::init_zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
let place = v.get();
let name = 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?
---
Cheers,
Benno
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the rust-pin-init tree
2025-06-10 8:15 ` Benno Lossin
@ 2025-06-10 9:32 ` Andreas Hindborg
2025-06-10 9:55 ` Benno Lossin
2025-06-10 9:56 ` Miguel Ojeda
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Hindborg @ 2025-06-10 9:32 UTC (permalink / raw)
To: Benno Lossin
Cc: Stephen Rothwell, Miguel Ojeda, Linux Kernel Mailing List,
Linux Next Mailing List
"Benno Lossin" <lossin@kernel.org> 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 the type parameter `T` declared on the function `zeroed`
>>> |
>>> help: consider specifying the generic argument
>>> |
>>> 154 | subsystem <- pin_init::zeroed::<T>().chain(
>>> | +++++
>>>
>>> error[E0282]: type annotations needed
>>> --> rust/kernel/configfs.rs:264:22
>>> |
>>> 264 | group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
>>> | ^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `zeroed`
>>> |
>>> help: consider specifying the generic argument
>>> |
>>> 264 | group <- pin_init::zeroed::<T>().chain(|v: &mut Opaque<bindings::config_group>| {
>>> | +++++
>>>
>>> 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=y`, 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<Data, Error>,
> ) -> impl PinInit<Self, Error> {
> try_pin_init!(Self {
> - subsystem <- pin_init::zeroed().chain(
> + subsystem <- pin_init::init_zeroed().chain(
> |place: &mut Opaque<bindings::configfs_subsystem>| {
> // SAFETY: We initialized the required fields of `place.group` above.
> unsafe {
> @@ -261,7 +261,7 @@ pub fn new(
> data: impl PinInit<Data, Error>,
> ) -> impl PinInit<Self, Error> {
> try_pin_init!(Self {
> - group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
> + group <- pin_init::init_zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
> let place = v.get();
> let name = 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 <a.hindborg@kernel.org>
Best regards,
Andreas Hindborg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the rust-pin-init tree
2025-06-10 9:32 ` Andreas Hindborg
@ 2025-06-10 9:55 ` Benno Lossin
0 siblings, 0 replies; 6+ messages in thread
From: Benno Lossin @ 2025-06-10 9:55 UTC (permalink / raw)
To: Andreas Hindborg
Cc: Stephen Rothwell, Miguel Ojeda, Linux Kernel Mailing List,
Linux Next Mailing List
On Tue Jun 10, 2025 at 11:32 AM CEST, Andreas Hindborg wrote:
> "Benno Lossin" <lossin@kernel.org> 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 the type parameter `T` declared on the function `zeroed`
>>>> |
>>>> help: consider specifying the generic argument
>>>> |
>>>> 154 | subsystem <- pin_init::zeroed::<T>().chain(
>>>> | +++++
>>>>
>>>> error[E0282]: type annotations needed
>>>> --> rust/kernel/configfs.rs:264:22
>>>> |
>>>> 264 | group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
>>>> | ^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `zeroed`
>>>> |
>>>> help: consider specifying the generic argument
>>>> |
>>>> 264 | group <- pin_init::zeroed::<T>().chain(|v: &mut Opaque<bindings::config_group>| {
>>>> | +++++
>>>>
>>>> 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=y`, 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<Data, Error>,
>> ) -> impl PinInit<Self, Error> {
>> try_pin_init!(Self {
>> - subsystem <- pin_init::zeroed().chain(
>> + subsystem <- pin_init::init_zeroed().chain(
>> |place: &mut Opaque<bindings::configfs_subsystem>| {
>> // SAFETY: We initialized the required fields of `place.group` above.
>> unsafe {
>> @@ -261,7 +261,7 @@ pub fn new(
>> data: impl PinInit<Data, Error>,
>> ) -> impl PinInit<Self, Error> {
>> try_pin_init!(Self {
>> - group <- pin_init::zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
>> + group <- pin_init::init_zeroed().chain(|v: &mut Opaque<bindings::config_group>| {
>> let place = v.get();
>> let name = 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 <a.hindborg@kernel.org>
Thanks and done!
---
Cheers,
Benno
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: build failure after merge of the rust-pin-init tree
2025-06-10 8:15 ` Benno Lossin
2025-06-10 9:32 ` Andreas Hindborg
@ 2025-06-10 9:56 ` Miguel Ojeda
1 sibling, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2025-06-10 9:56 UTC (permalink / raw)
To: Benno Lossin
Cc: Stephen Rothwell, Miguel Ojeda, Andreas Hindborg,
Linux Kernel Mailing List, Linux Next Mailing List
On Tue, Jun 10, 2025 at 10:15 AM Benno Lossin <lossin@kernel.org> wrote:
>
> @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?
If I understand correctly, the commit that introduced the issue
(0bcaea04244b) is in your branch (rust/pin-init-next), thus you should
fix it in your branch.
Personally, I would just rebase, since you just applied them hours ago.
As a maintainer, you are trusted to not introduce a change that others
could disagree with (especially on their files) -- but you already
told Andreas and discussed it here, so you did the right thing :)
You can consider mentioning the change in the [ ... ] part, if you want.
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-06-10 9:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10 4:22 linux-next: build failure after merge of the rust-pin-init tree Stephen Rothwell
2025-06-10 7:59 ` Benno Lossin
2025-06-10 8:15 ` Benno Lossin
2025-06-10 9:32 ` Andreas Hindborg
2025-06-10 9:55 ` Benno Lossin
2025-06-10 9:56 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox