Re: [PATCH 12/12] PM / core: Add AVOID_RPM driver flag
From: Andy Shevchenko
Date: Tue Oct 17 2017 - 12:30:29 EST
On Tue, 2017-10-17 at 17:59 +0200, Rafael J. Wysocki wrote:
> On Tuesday, October 17, 2017 5:33:17 PM CEST Andy Shevchenko wrote:
> > On Mon, 2017-10-16 at 03:32 +0200, Rafael J. Wysocki wrote:
> > > If DPM_FLAG_SMART_SUSPEND is not set, DPM_FLAG_AVOID_RPM has no
> > > effect.
> > >
> > > + if (dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND)
> > > &&
> > > + dev_pm_test_driver_flags(dev, DPM_FLAG_AVOID_RPM)) {
> >
> > Wasn't interface designed to allow something like:
> > if (dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND |
> > DPM_FLAG_AVOID_RPM)) {
> > instead?
>
> That would return true if any of them was set and both are needed
> here.
Ah, indeed. It would not be equivalent.
--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy