* John Stultz <john.stu...@linaro.org> wrote: > clocksource_max_deferment() doesn't do anything useful > anymore, so zap it.
Well, it does something useful, it encapsulates the max_deferment property of the clocksource: > -static u64 clocksource_max_deferment(struct clocksource *cs) > -{ > - u64 max_nsecs; > - > - max_nsecs = clocks_calc_max_nsecs(cs->mult, cs->shift, cs->maxadj, > - cs->mask); > - return max_nsecs; > -} Which could be written in a shorter form, using: static u64 clocksource_max_deferment(struct clocksource *cs) { return clocks_calc_max_nsecs(cs->mult, cs->shift, cs->maxadj, cs->mask); } Which all allows short forms of: cs->max_idle_ns = clocksource_max_deferment(cs); without writing out all the arguments. Instead of that, you've introduced: > + cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, > + cs->maxadj, cs->mask); > + cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, > + cs->maxadj, cs->mask); Which in the next patch gets even worse: > cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, > + cs->maxadj, cs->mask, > + &cs->max_cycles); > /* calculate max idle time permitted for this clocksource */ > cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, > + cs->maxadj, cs->mask, > + &cs->max_cycles); While with the helper function it would still be the same sweet: cs->max_idle_ns = clocksource_max_deferment(cs); So I don't think this cleanup is an improvement ... Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/