]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: optimize DIV_ROUND_CLOSEST() call
authorJean Delvare <khali@linux-fr.org>
Fri, 28 Sep 2012 00:18:54 +0000 (10:18 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 3 Oct 2012 06:46:38 +0000 (16:46 +1000)
DIV_ROUND_CLOSEST is faster if the compiler knows it will only be dealing
with unsigned dividends.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/gpu/drm/i915/intel_pm.c

index d69f8f49beb5bf2a67f87f9b708a5a99af1616ff..dd246b16885b7d8e24883e1735c96b4fbc93e3e6 100644 (file)
@@ -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));