dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vedran Miletić" <vedran@miletic.net>
To: dri-devel@lists.freedesktop.org
Cc: linuxdev.baldrick@gmail.com, dcb314@hotmail.com
Subject: [PATCH] drm/msm/mdp5: Remove "pipe < 0" check
Date: Wed, 29 Jun 2016 14:51:10 +0200	[thread overview]
Message-ID: <1467204670-6663-2-git-send-email-vedran@miletic.net> (raw)
In-Reply-To: <1467204670-6663-1-git-send-email-vedran@miletic.net>

From: David Binderman <linuxdev.baldrick@gmail.com>

For usingned int pipe, pipe < 0 is always true.
---
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
index 484b4d1..352b7ad 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
@@ -542,7 +542,7 @@ static int mdp5_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
 	struct msm_drm_private *priv = dev->dev_private;
 	struct drm_crtc *crtc;
 
-	if (pipe < 0 || pipe >= priv->num_crtcs) {
+	if (pipe >= priv->num_crtcs) {
 		DRM_ERROR("Invalid crtc %d\n", pipe);
 		return -EINVAL;
 	}
@@ -564,7 +564,7 @@ static u32 mdp5_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
 	struct drm_crtc *crtc;
 	struct drm_encoder *encoder;
 
-	if (pipe < 0 || pipe >= priv->num_crtcs)
+	if (pipe >= priv->num_crtcs)
 		return 0;
 
 	crtc = priv->crtcs[pipe];
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-06-29 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 14:51 linux-4.7-rc3/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c: 2 * pointless tests ? David Binderman
2016-06-13 15:27 ` Rob Clark
     [not found]   ` <CAF6AEGtvE1bseBiKwyoQDwRZS_dks4EsVYE_k7naA77p9410mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-15 10:03     ` David Binderman
2016-06-29 12:51   ` [PATCH] drm/msm/mdp5: Remove "pipe < 0" check Vedran Miletić
2016-06-29 12:51     ` Vedran Miletić [this message]
2016-07-12 10:24       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467204670-6663-2-git-send-email-vedran@miletic.net \
    --to=vedran@miletic.net \
    --cc=dcb314@hotmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linuxdev.baldrick@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox