On Mon, Feb 8, 2016 at 12:39 PM, Viresh Kumar viresh.kumar@linaro.org wrote:
We have got five common sysfs tunables between ondemand and conservative governors, move their callbacks to cpufreq_governor.c to get rid of redundant code.
Because of minor differences in the implementation of the callbacks, some more per-governor callbacks are introduced in order to not introduce any more "governor == ONDEMAND/CONSERVATIVE" like checks.
My most fundamental concern here is that attributes that don't apply to a particular governor should not appear in sysfs at all when that governor is in use (instead of appearing and always returning -EINVAL which is sort of silly).
That doesn't mean the common code cannot access them, though. They still can be present in the data structure, but it may be a good idea to set them to special values clearly meaning "invalid" then.
Thanks, Rafael