Skip to content
  • Rafael J. Wysocki's avatar
    22590efb
    intel_pstate: Avoid pointless FRAC_BITS shifts under div_fp() · 22590efb
    Rafael J. Wysocki authored
    
    
    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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    22590efb
    intel_pstate: Avoid pointless FRAC_BITS shifts under div_fp()
    Rafael J. Wysocki authored
    
    
    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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Loading