From: Jean Delvare Date: Fri, 9 Nov 2012 03:03:49 +0000 (+1100) Subject: drm/i915: optimize DIV_ROUND_CLOSEST() call X-Git-Tag: next-20121112~5^2~279 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cbee36b4b1cf31679033dbb091133a2d5e285224;p=karo-tx-linux.git drm/i915: optimize DIV_ROUND_CLOSEST() call DIV_ROUND_CLOSEST is faster if the compiler knows it will only be dealing with unsigned dividends. Signed-off-by: Jean Delvare Cc: Guenter Roeck Cc: Daniel Vetter Cc: David Airlie Signed-off-by: Andrew Morton --- diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 72f41aaa71ff..f54ba636d70d 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2547,7 +2547,8 @@ static void gen6_update_ring_freq(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; int min_freq = 15; - int gpu_freq, ia_freq, max_ia_freq; + int gpu_freq; + unsigned int ia_freq, max_ia_freq; int scaling_factor = 180; WARN_ON(!mutex_is_locked(&dev->struct_mutex));