Re: [PATCH] PM: Prevent dpm_prepare() from returning errors unnecessarily

Alan Stern
2010-12-01T15:15:58Z

On Tue, 30 Nov 2010, Rafael J. Wysocki wrote:

> > Provided you repair the error that Lei Ming pointed out. That's the
> > problem with functions that return Boolean values -- you have to name
> > them very carefully. Ideally the name should be a predicate or a
> > question.
>
> I already have fixed it.
>
> The name is unfortunate indeed, perhaps it's better to call that function
> pm_new_wakeup_events() or something like this.

Or pm_any_wakeup_events(). And reverse the meaning of the return
value, of course -- it would be good to explain the return value in
the kerneldoc.

Alan Stern