[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQCSS_h47zUVilno@google.com>
Date: Tue, 28 Oct 2025 09:52:11 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: "Uwe Kleine-König" <ukleinek@...nel.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>, Michal Wilczynski <m.wilczynski@...sung.com>,
Danilo Krummrich <dakr@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Daniel Almeida <daniel.almeida@...labora.com>, Peter Colberg <pcolberg@...hat.com>,
Lyude Paul <lyude@...hat.com>, Miguel Ojeda <ojeda@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>, Viresh Kumar <viresh.kumar@...aro.org>,
Alexandre Courbot <acourbot@...dia.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: linux-next: build failure after merge of the pwm tree'
On Mon, Oct 27, 2025 at 09:11:31AM +0100, Uwe Kleine-König wrote:
> Hello Stephen,
>
> thanks for your report (and creating next each day!)
>
> On Mon, Oct 27, 2025 at 12:51:48PM +1100, Stephen Rothwell wrote:
> > After merging the pwm tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> >
> > error[E0277]: the trait bound `core::result::Result<core::pin::Pin<Box<Th1520PwmPlatformDriver, Kmalloc>>, kernel::error::Error>: PinInit<Th1520PwmPlatformDriver, kernel::error::Error>` is not satisfied
> > --> drivers/pwm/pwm_th1520.rs:331:10
> > |
> > 331 | ) -> Result<Pin<KBox<Self>>> {
> > | ^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
> > |
> > = help: the trait `PinInit<Th1520PwmPlatformDriver, kernel::error::Error>` is not implemented for `Result<Pin<Box<Th1520PwmPlatformDriver, Kmalloc>>, Error>`
> > but trait `PinInit<core::pin::Pin<Box<Th1520PwmPlatformDriver, Kmalloc>>, kernel::error::Error>` is implemented for it
> > = help: for that trait implementation, expected `core::pin::Pin<Box<Th1520PwmPlatformDriver, Kmalloc>>`, found `Th1520PwmPlatformDriver`
> > note: required by a bound in `kernel::platform::Driver::{synthetic#0}`
> > --> rust/kernel/platform.rs:196:15
> > |
> > 196 | ) -> impl PinInit<Self, Error>;
> > | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Driver::{synthetic#0}`
> >
> > error: aborting due to 1 previous error
> >
> > For more information about this error, try `rustc --explain E0277`.
> >
> > Caused by commit
> >
> > fb3957af9ec6 ("pwm: Add Rust driver for T-HEAD TH1520 SoC")
> >
> > presumably interacting with something merged earlier in my tree.
> > If someone could provide me with an appropriate merge resolution, I will
> > apply it.
>
> Having no relevant clue about Rust, I bisected that. The bisection points to
> 0242623384c7 ("rust: driver: let probe() return impl PinInit<Self, Error>").
>
> Translating the changes that commit does to
> drivers/gpu/drm/nova/driver.rs for drivers/pwm/pwm_th1520.rs results in:
>
> diff --git a/drivers/pwm/pwm_th1520.rs b/drivers/pwm/pwm_th1520.rs
> index 0ad38b78be85..dd554574adc8 100644
> --- a/drivers/pwm/pwm_th1520.rs
> +++ b/drivers/pwm/pwm_th1520.rs
> @@ -328,7 +328,7 @@ impl platform::Driver for Th1520PwmPlatformDriver {
> fn probe(
> pdev: &platform::Device<Core>,
> _id_info: Option<&Self::IdInfo>,
> - ) -> Result<Pin<KBox<Self>>> {
> + ) -> impl PinInit<Self, Error> {
> let dev = pdev.as_ref();
> let request = pdev.io_request_by_index(0).ok_or(ENODEV)?;
>
> @@ -365,7 +365,7 @@ fn probe(
>
> pwm::Registration::register(dev, chip)?;
>
> - Ok(KBox::new(Th1520PwmPlatformDriver, GFP_KERNEL)?.into())
> + Ok(Th1520PwmPlatformDriver)
> }
> }
>
> which builds again.
This merge resolution looks correct.
Alice
Powered by blists - more mailing lists