lkml.org 
[lkml]   [2022]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] PM: runtime: Return -EINPROGRESS from rpm_resume() in the RPM_NOWAIT case
On Fri, 23 Sept 2022 at 17:53, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Fri, Sep 23, 2022 at 3:26 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Thu, 22 Sept 2022 at 20:04, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > >
> > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > The prospective callers of rpm_resume() passing RPM_NOWAIT to it may
> > > be confused when it returns 0 without actually resuming the device
> > > which may happen if the device is suspending at the given time and it
> > > will only resume when the suspend in progress has completed. To avoid
> > > that confusion, return -EINPROGRESS from rpm_resume() in that case.
> > >
> > > Since none of the current callers passing RPM_NOWAIT to rpm_resume()
> > > check its return value, this change has no functional impact.
> >
> > Sounds like there are additional improvements that can be made around
> > this, right?
>
> This allows RPM_NOWAIT to be used in places where the caller doesn't
> want to wait, because it might deadlock or similar, but they still
> need to know whether or not the device can be accessed safely.
>
> Or do you mean something else?

Nope, I was mostly wondering if you are planning to make those
improvements too. Sooner or later.

[...]

Kind regards
Uffe

\
 
 \ /
  Last update: 2022-09-26 11:51    [W:0.058 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site