[PATCH] drm/radeon: Update radeon_get_vblank_counter_kms()

Thierry Reding thierry.reding at gmail.com
Mon Jan 4 03:28:43 PST 2016


On Thu, Dec 17, 2015 at 03:35:50PM +0900, Michel Dänzer wrote:
> On 16.12.2015 23:31, Thierry Reding wrote:
> > 
> > -	if (crtc < 0 || crtc >= rdev->num_crtc) {
> > -		DRM_ERROR("Invalid crtc %d\n", crtc);
> > +	if (pipe < 0 || pipe >= rdev->num_crtc) {
> > +		DRM_ERROR("Invalid crtc %u\n", pipe);
> 
> 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 => 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20160104/e9866ab8/attachment.sig>


More information about the dri-devel mailing list