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

From: Alan Stern
Date: Wed Dec 01 2010 - 10:16:01 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/