From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/radeon: Update radeon_get_vblank_counter_kms() Date: Mon, 4 Jan 2016 12:28:43 +0100 Message-ID: <20160104112843.GA29079@ulmo> References: <1450276307-13032-1-git-send-email-thierry.reding@gmail.com> <567257C6.908@daenzer.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1516247176==" Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FF356E098 for ; Mon, 4 Jan 2016 03:28:46 -0800 (PST) Received: by mail-wm0-f41.google.com with SMTP id f206so208681350wmf.0 for ; Mon, 04 Jan 2016 03:28:46 -0800 (PST) In-Reply-To: <567257C6.908@daenzer.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Michel =?utf-8?Q?D=C3=A4nzer?= Cc: Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1516247176== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 17, 2015 at 03:35:50PM +0900, Michel D=C3=A4nzer wrote: > On 16.12.2015 23:31, Thierry Reding wrote: > >=20 > > - if (crtc < 0 || crtc >=3D rdev->num_crtc) { > > - DRM_ERROR("Invalid crtc %d\n", crtc); > > + if (pipe < 0 || pipe >=3D rdev->num_crtc) { > > + DRM_ERROR("Invalid crtc %u\n", pipe); >=20 > Does it still make sense to test for < 0? Doesn't that generate a > compiler warning? I didn't see a compiler warning in my build tests, but you're right, it's not necessary to check for that because it can't be true. I'll respin with that fixed up. > Also, I don't really get the point of the crtc =3D> pipe rename here... This is primarily for consistency. That way we can reserve "pipe" for the unsigned integers that denote the DRM index of the CRTC, and keep "crtc" for cases where we deal with struct drm_crtc objects. Thierry --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWildoAAoJEN0jrNd/PrOhMoQP/jdnz2pQG4ZHuULty7annrkr NdTKL7+5XmiitldjnJYKjFoLTqYu3PgZA/EU2+79UMUiO+AEx6UwHyxjj9xM31U5 4/1nvqcDtwIqIRNAhFUNJqQ8y/ZcEM4oRCdcnLEYz9+yzcZ3hDgIlIb6NhPvfn1O ukjSKVn07IkzlWk4lub396JYzY9CGMqfEqGqYjA+MkHpzZIanBozWZZ5OD0k9cS/ ydnh7yeAb12Rzt0VzxPXvVXDUb5R7oE03i566Y+lHzWkX7UncY18tt9YmSim6cAz NfEXUzOSKIq+ErklGNwPlYd8sH9HGz3D1LamxUBVMIt7EIpomi/96U3UOUEJAouj sFjVfOf4XFqlMzxcePm2vmpa6BM1ixQzTJin5KfcYyEKZYy8O07hiSgv4cXcDmkm j9MMXuh6GVmGhFM+pUrA5uz838TxzwKXWgpoigrUQ8WwkEndeAu+XCcWSIS3IS4U y9ke0MQeqh8bjQNoBaGoAXp/etdZbEd9ki3013Xk7Qg8Ma3XZEkkSv0qgtZvYJtL NlBtVD136yl75DvP1jKfeP0lQJozk9vElKtbSPFglbG5ptXOGFcDjIEESq3ln1iv xlE/z7NiqCLyRUuZaCP+xPyjZDPrMWl4ryWbcX4JGfXeoZfZlkqwlICfMgMctQzn bPgksw4Qr3E0oveEfZSC =xHS9 -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG-- --===============1516247176== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1516247176==--