intel_pstate: Avoid pointless FRAC_BITS shifts under div_fp()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Apr 2016 23:25:58 +0000 (01:25 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Apr 2016 23:25:58 +0000 (01:25 +0200)
commit22590efb98ae0c84f798a9938c0b6d97bc89adf5
tree0ee9817ec59901350d6deef093d613e427284619
parent2249c00a0bf854adf49e8e3c2973feddfbaae71f
intel_pstate: Avoid pointless FRAC_BITS shifts under div_fp()

There are multiple places in intel_pstate where int_tofp() is applied
to both arguments of div_fp(), but this is pointless, because int_tofp()
simply shifts its argument to the left by FRAC_BITS which mathematically
is equivalent to multuplication by 2^FRAC_BITS, so if this is done
to both arguments of a division, the extra factors will cancel each
other during that operation anyway.

Drop the pointless int_tofp() applied to div_fp() arguments throughout
the driver.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c
This page took 0.032781 seconds and 5 git commands to generate.