[PATCH] drm/radeon: Drop unnecessary unsigned int < 0 check
Alex Deucher
alexdeucher at gmail.com
Mon Jan 4 09:31:14 PST 2016
On Mon, Jan 4, 2016 at 12:19 PM, Thierry Reding
<thierry.reding at gmail.com> wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> Unsigned integers can never be negative, so drop this check.
>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 4fab44e0f36b..414953c46a38 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the dri-devel
mailing list