linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <hofrat@osadl.org>
To: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	Jordan Crouse <jcrouse@codeaurora.org>,
	Archit Taneja <architt@codeaurora.org>,
	Daniel Mack <daniel@zonque.org>,
	Sibi Sankar <sibis@codeaurora.org>,
	Chandan Uddaraju <chandanu@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Nicholas Mc Guire <hofrat@osadl.org>
Subject: [PATCH] drm/msm: check for equals 0 only
Date: Thu, 25 Apr 2019 16:03:51 +0200	[thread overview]
Message-ID: <1556201031-3676-1-git-send-email-hofrat@osadl.org> (raw)

wait_for_completion_timeout() returns 0 on timeout and aleast 1 otherwise
so checking for < makes no sense here. 

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

Problem located with an experimental coccinelle script

While this check does no harm in this form - it should be fixed anyway
to comply with the API see: kernel/sched/completion.c

Also noticed that get_maintainer.pl will not list linux-kernel@vger.kernel.org
when run on drivers/gpu/drm/msm/dsi/dsi_host.c - is that intentional ?

Patch was compile-tested with: qcom_defconfig (implies DRM_MSM_DSI=y)

Patch is against v5.1-rc6 (localversion-next is next-20190424)

 drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 610183d..dc16067 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1049,7 +1049,7 @@ static void dsi_wait4video_done(struct msm_dsi_host *msm_host)
 	ret = wait_for_completion_timeout(&msm_host->video_comp,
 			msecs_to_jiffies(70));
 
-	if (ret <= 0)
+	if (ret == 0)
 		DRM_DEV_ERROR(dev, "wait for video done timed out\n");
 
 	dsi_intr_ctrl(msm_host, DSI_IRQ_MASK_VIDEO_DONE, 0);
-- 
2.1.4


             reply	other threads:[~2019-04-25 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 14:03 Nicholas Mc Guire [this message]
2019-04-25 22:52 ` [Freedreno] [PATCH] drm/msm: check for equals 0 only Abhinav Kumar
2019-04-26  0:02 ` Rob Clark

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=1556201031-3676-1-git-send-email-hofrat@osadl.org \
    --to=hofrat@osadl.org \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=chandanu@codeaurora.org \
    --cc=daniel@ffwll.ch \
    --cc=daniel@zonque.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jcrouse@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=sibis@codeaurora.org \
    /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;
as well as URLs for NNTP newsgroup(s).