All of lore.kernel.org
 help / color / mirror / Atom feed
* smatch: radeon: unsigned is never less than zero
@ 2010-04-05 11:42 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-04-05 11:42 UTC (permalink / raw)
  To: dri-devel, alexdeucher

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&#174; 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
--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-05 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05 11:42 smatch: radeon: unsigned is never less than zero Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.