Re: [PATCH 2/2] cpuidle: governors: Move the files to the upper directory

From: Rafael J. Wysocki
Date: Fri Oct 21 2016 - 08:47:31 EST


On Wed, Oct 5, 2016 at 9:33 AM, Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
> Currently the different governors are stored in the subdir
> 'governors'. That is not a problem.
>
> However, that forces to declare some private structure in the
> include/linux/cpuidle.h header because these governor files
> don't have access to the private 'cpuidle.h' located in
> drivers/cpuidle.
>
> Instead of having the governors in the separate directory, move
> them along with the drivers and prefix them with 'governor-',
> that allows to do a proper cleanup in the cpuidle headers.

While I'm not particularly against this change, I'm sort of wondering
about the reason.

What in particular would be wrong with doing

#include "../cpuidle.h"

in a governor .c file?

Thanks,
Rafael