From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: smatch: radeon: unsigned is never less than zero Date: Mon, 5 Apr 2010 14:42:48 +0300 Message-ID: <20100405114248.GP5265@bicker> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: dri-devel@lists.sourceforge.net, alexdeucher@gmail.com List-Id: dri-devel@lists.freedesktop.org Hi list, Smatch complains about this: drivers/gpu/drm/radeon/radeon_display.c +563 radeon_compute_pll_legacy(115) warn: unsigned 'error' is never less than zero. 561 if (pll->flags & RADEON_PLL_PREFER_CLOSEST_LOWER) { 562 error = freq - current_freq; 563 error = error < 0 ? 0xffffffff : error; ^^^^^^^^^ "error" is unsigned so it's never less than zero here. 564 } else 565 error = abs(current_freq - freq); regards, dan carpenter ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --