Re: [PATCH v1 2/3] PM / Sleep: introduce dpm_for_each_dev

From: Rafael J. Wysocki
Date: Sat Aug 18 2012 - 09:33:28 EST


On Saturday, August 18, 2012, Ming Lei wrote:
> On Sat, Aug 18, 2012 at 6:02 AM, Rafael J. Wysocki <rjw@xxxxxxx> wrote:
> > On Friday, August 17, 2012, Ming Lei wrote:
> >> +void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *))
> >
> > Is this function actually used more than once?
>
> At least now, it is called each time before system sleep.

My question was about the number of current users of it. Sorry for not
being clear.

If there are no more anticipated users than the current only one, please
drop the unused (void *) argument. We can always extend it in the future
if need be and for now passing that NULL every time is just pointless.

And please fold [2/3] into [3/3] in this series.

I'm not particuarly fond of this patch, but I guess it would require some
consderable juggling of #ifdefs to fix the build breakage in a different way.

Thanks,
Rafael
--
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/