drm2/radeon dfixed_trunc() warnings

Sean Bruno sean_bruno at yahoo.com
Sun Oct 6 21:39:19 UTC 2013


These caught my eye today, and the checks strewn about
sys/dev/drm2/radeon seem completely bogus to me, but I don't have the
h/w to test it at the moment.

/usr/src/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/rs690.c:491:37: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                if (dfixed_trunc(priority_mark02) < 0)


dfixed_trunc is a macro:
drm_fixed.h:#define dfixed_trunc(A) ((A).full >> 12)

that returns the output of a shift right operation ... priority_mark02
is of type union fixed20_12, single element union of type u32, so I
can't see this check ever doing anything useful.

But, as always, I'm probably missing something obvious.  

Sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20131006/a2dc6c5e/attachment.sig>


More information about the freebsd-current mailing list