From acef74404ba2e3a8a89145ad399c131cc4656901 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 13 Sep 2012 10:58:19 +1000 Subject: [PATCH] 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 --- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index e2d30b8c6e1f..85f0a9322593 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2545,7 +2545,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)); -- 2.39.5