drm/radeon: Drop unnecessary unsigned int < 0 check
Subsystems (2)
PATCH 1/1 drm/radeon: Drop unnecessary unsigned int < 0 check
From: Thierry Reding <[email protected]>
Unsigned integers can never be negative, so drop this check.
Cc Christian König <[email protected]>
Cc Alex Deucher <[email protected]>
Signed-off-by Thierry Reding <[email protected]>
--- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_kms.c +1 -1
@@ -759,7 +759,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)u32 count;struct radeon_device *rdev = dev->dev_private; -if (pipe <0 || pipe >= rdev->num_crtc) { +if (pipe >= rdev->num_crtc) {DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedQuoted 7 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Unsigned integers can never be negative, so drop this check.
Cc Christian König <[email protected]>Cc Alex Deucher <[email protected]>Signed-off-by Thierry Reding <[email protected]>
Applied. thanks!
Alex
Quoted 20 lines
--- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_kms.c +1
-2@@ -759,7 +759,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)u32 count;struct radeon_device *rdev = dev->dev_private; -if (pipe <0 || pipe >= rdev->num_crtc) { +if (pipe >= rdev->num_crtc) {DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; } --2.5.0
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel