From owner-freebsd-x11@FreeBSD.ORG Mon Oct 7 23:39:47 2013 Return-Path: Delivered-To: freebsd-X11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2022217A for ; Mon, 7 Oct 2013 23:39:47 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm14-vm2.bullet.mail.gq1.yahoo.com (nm14-vm2.bullet.mail.gq1.yahoo.com [98.136.218.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4D112E15 for ; Mon, 7 Oct 2013 23:39:43 +0000 (UTC) Received: from [216.39.60.183] by nm14.bullet.mail.gq1.yahoo.com with NNFMP; 07 Oct 2013 23:39:37 -0000 Received: from [98.136.164.71] by tm19.bullet.mail.gq1.yahoo.com with NNFMP; 07 Oct 2013 23:39:37 -0000 Received: from [127.0.0.1] by smtp233.mail.gq1.yahoo.com with NNFMP; 07 Oct 2013 23:39:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1381189177; bh=c+7JLt7ucxkUjiQhCYyqYbcqPKy1NemN0sOQK3JacOw=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=YLUmZWa5EuHywjlcnGhwwubWa2AqX6FMl/UZn7t1sodjbweJC1nIQblPdB4zRSqLEFaZI7EUjv8ZsvTIWOMZpeAVbinuG+TpDv3Q8kw0bGr/V8cKiXPhchFLpgPp1Wu4p0lbKj40bzZdwdIr5+UL6Yg7z/J3bx5G70pGYPOnImU= X-Yahoo-Newman-Id: 725299.62880.bm@smtp233.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 9AdBtLsVM1krOpsuohFPUqQKYVJzBQnJIsux3r7lQ7eptne jOp2UAdkfufebO0fxhh_f4SGiGabA5p_jeumAtpW1hV1r5nE22uvnZ.HdIDL PJpS_.NkQJMNWIlDqmcRRk1Evh_i4rc6PIApAozWf6ekMGK4vsl6MzwBFQmJ AFX.RyltymC.xnqMKo.xYCOTkb4Z_wavU1oBI9dJB16Pg3TuftzY.GjH8m2b GOlkdPnZMAB19NIZLjE1Rs4MZ7wo459xmFU4UmT7bZ3QvEwc2TuCKVUf_fz7 kdnsWIrZqj4N2vYV96CZP9K9xYL7RyXHgoj_8yTyD2PKQ2U_145snWvNNAtJ cz6XJgQ8URZC9PMbmn1ZUtIHXISxn5Gv15lv8a4MaeyaVyErD0LwPhTTO_v9 A72Eb5aMBx1Dat9p_s7QYT.9MTorw9gsWR_EBeAm_9Y6ekK97KWVCD91p3oq fxfTC2LRthC6tTSU8_EHNFjyDXZ_bOhQ_IYqYUCPZWKsG104qKuHdbrktVZe YrHhDE4My64QOA.VsDezpXae4BFfQ_8QOEq0.VNDhGkJ8p3dz3uxIwrN2zUa hwUdE9Be3N94yfKeYCH_K3.cOtb73dAoc1RB5oab0U4TuiB8KXtDQsUE2g9e gHOPYmkC.hxVl02PbnOBw5d8050CfLvO821FdzkU6cUU.QF6i X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp233.mail.gq1.yahoo.com with SMTP; 07 Oct 2013 23:39:36 +0000 UTC Subject: [patch] Re: drm2/radeon dfixed_trunc() warnings From: Sean Bruno To: freebsd-X11@freebsd.org In-Reply-To: <1381095549.1586.7.camel@localhost> References: <1381095549.1586.7.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-s8BvuewmrJOizElEsmSE" Date: Mon, 07 Oct 2013 16:39:36 -0700 Message-ID: <1381189176.3399.4.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Oct 2013 23:39:47 -0000 --=-s8BvuewmrJOizElEsmSE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [repost from -current] On Sun, 2013-10-06 at 14:39 -0700, Sean Bruno wrote:=20 > 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. >=20 > /usr/src/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/rs690.c:491:= 37: warning: comparison of unsigned expression < 0 is always false [-Wtauto= logical-compare] > if (dfixed_trunc(priority_mark02) < 0) >=20 >=20 > dfixed_trunc is a macro: > drm_fixed.h:#define dfixed_trunc(A) ((A).full >> 12) >=20 > 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. >=20 > But, as always, I'm probably missing something obvious. =20 >=20 > Sean Proposed patch to eliminate this check. If I understand the macro correctly, there's no way for these checks to ever do anything as bit shifting an unsigned will simply clear out the value. So, the check for <0 is completely bogus? Sean http://people.freebsd.org/~sbruno/drm2_radeon_useless.txt=20 --=-s8BvuewmrJOizElEsmSE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSU0YwAAoJEBkJRdwI6BaHBXsIAIWcgw63yaI4r5eY/LHc4S7k 3qMhrIBqVHMTGEuAQhzvFQq8jNCyR2Yn0LayVDdsY8BwhQSumxEjKDgZcH5cmoy0 RHRt3MK+QCAg4HY0t948fEY3fkaNSjuUUnh78UrPWf6fagDILFpExqZEz2vy/1FW 0N4b4gI7slsvidxEnp6YO/5TQXBlsGBhPUsJ0mboSJ0Ah3dddVQX68TGTy/g5iqZ 7j78UAB6Nil019v2Ub1BcC67hfp3Yf9tFhYPqPXR3xz8RBmd1TDBQirerJkT0Wud L6UykuknduUS/ciVffSzWelX6sDeeosQj9efgQ311HFv2JJZFBr6P8YUojAPPjE= =6KtV -----END PGP SIGNATURE----- --=-s8BvuewmrJOizElEsmSE--