[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mrnepuygncvslqg4mxxedsyiujdw4wqp4ofvykagwzycnn3pda@jzockckj55tt>
Date: Tue, 21 Oct 2025 10:03:23 -0500
From: Lucas De Marchi <lucas.demarchi@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC: "Usyskin, Alexander" <alexander.usyskin@...el.com>, Miquel Raynal
<miquel.raynal@...tlin.com>, Richard Weinberger <richard@....at>, "Vignesh
Raghavendra" <vigneshr@...com>, "linux-mtd@...ts.infradead.org"
<linux-mtd@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Abliyev, Reuven" <reuven.abliyev@...el.com>
Subject: Re: [PATCH] mtd: intel-dg: wake card on operations
On Tue, Oct 21, 2025 at 05:39:34PM +0300, Andy Shevchenko wrote:
>On Tue, Oct 21, 2025 at 12:51:30PM +0000, Usyskin, Alexander wrote:
>> > On Mon, Oct 20, 2025 at 01:09:10PM +0300, Andy Shevchenko wrote:
>> > > On Sun, Oct 19, 2025 at 06:01:45PM +0300, Alexander Usyskin wrote:
>
>...
>
>> > > > + devm_pm_runtime_enable(device);
>> > >
>> > > Please, justify why this code is good without error checking. Before doing
>> > that
>> > > think for a moment for the cases when devm_*() might be developed in the
>> > future
>> > > and return something interesting (if not yet).
>>
>> We should not fail the probe because of runtime pm enablement failure, I suppose.
not really
>> There are other ways to keep card awake.
>> The pm_runtime_* functions work without runtime_enable but have no effect.
>> Thus, we can ignore failure here.
>
>Using devm_*() in such a case is misleading. It incorporates errors from
>different layers and ignoring both is odd.
>
>I would suggest to avoid using devm_*() in this case and put a comment on
>the ignored PM errors (however, personally I think this approach is wrong).
Agreed. We should not silently continue on error. Fix the cause of the
error intead. If it's something that can be disabled in
runtime/configure time, and it doesn't return success, handle that
specific error code.
If there's a reason to ignore the error, it should be intentional.
Lucas De Marchi
Powered by blists - more mailing lists