time: Rename misnamed minsec argument of clocks_calc_mult_shift()

The minsec argument to clocks_calc_mult_shift() is misnamed. It is used
to clamp the magnitude of the mult factor so that a multiplication with
any value in the given range won't overflow a 64 bit result. Let's
rename it to match the actual usage.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: John Stultz <johnstul@us.ibm.com>
LKML-Reference: <alpine.LFD.2.00.1101111207140.17086@xanadu.home>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by Nicolas Pitre and committed by Thomas Gleixner 5fdade95 cb600d2f

+4 -4
+4 -4
kernel/time/clocksource.c
··· 113 * @shift: pointer to shift variable 114 * @from: frequency to convert from 115 * @to: frequency to convert to 116 - * @minsec: guaranteed runtime conversion range in seconds 117 * 118 * The function evaluates the shift/mult pair for the scaled math 119 * operations of clocksources and clockevents. ··· 122 * NSEC_PER_SEC == 1GHz and @from is the counter frequency. For clock 123 * event @to is the counter frequency and @from is NSEC_PER_SEC. 124 * 125 - * The @minsec conversion range argument controls the time frame in 126 * seconds which must be covered by the runtime conversion with the 127 * calculated mult and shift factors. This guarantees that no 64bit 128 * overflow happens when the input value of the conversion is ··· 131 * factors. 132 */ 133 void 134 - clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec) 135 { 136 u64 tmp; 137 u32 sft, sftacc= 32; ··· 140 * Calculate the shift factor which is limiting the conversion 141 * range: 142 */ 143 - tmp = ((u64)minsec * from) >> 32; 144 while (tmp) { 145 tmp >>=1; 146 sftacc--;
··· 113 * @shift: pointer to shift variable 114 * @from: frequency to convert from 115 * @to: frequency to convert to 116 + * @maxsec: guaranteed runtime conversion range in seconds 117 * 118 * The function evaluates the shift/mult pair for the scaled math 119 * operations of clocksources and clockevents. ··· 122 * NSEC_PER_SEC == 1GHz and @from is the counter frequency. For clock 123 * event @to is the counter frequency and @from is NSEC_PER_SEC. 124 * 125 + * The @maxsec conversion range argument controls the time frame in 126 * seconds which must be covered by the runtime conversion with the 127 * calculated mult and shift factors. This guarantees that no 64bit 128 * overflow happens when the input value of the conversion is ··· 131 * factors. 132 */ 133 void 134 + clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec) 135 { 136 u64 tmp; 137 u32 sft, sftacc= 32; ··· 140 * Calculate the shift factor which is limiting the conversion 141 * range: 142 */ 143 + tmp = ((u64)maxsec * from) >> 32; 144 while (tmp) { 145 tmp >>=1; 146 sftacc--;