* [PATCH] drm/msm: check for equals 0 only
@ 2019-04-25 14:03 Nicholas Mc Guire
2019-04-25 22:52 ` [Freedreno] " Abhinav Kumar
2019-04-26 0:02 ` Rob Clark
0 siblings, 2 replies; 3+ messages in thread
From: Nicholas Mc Guire @ 2019-04-25 14:03 UTC (permalink / raw)
To: Rob Clark
Cc: Sean Paul, David Airlie, Daniel Vetter, Abhinav Kumar,
Jordan Crouse, Archit Taneja, Daniel Mack, Sibi Sankar,
Chandan Uddaraju, linux-arm-msm, dri-devel, freedreno,
linux-kernel, Nicholas Mc Guire
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Freedreno] [PATCH] drm/msm: check for equals 0 only
2019-04-25 14:03 [PATCH] drm/msm: check for equals 0 only Nicholas Mc Guire
@ 2019-04-25 22:52 ` Abhinav Kumar
2019-04-26 0:02 ` Rob Clark
1 sibling, 0 replies; 3+ messages in thread
From: Abhinav Kumar @ 2019-04-25 22:52 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Rob Clark, freedreno, Archit Taneja, David Airlie, linux-arm-msm,
dri-devel, linux-kernel, Jordan Crouse, Sibi Sankar,
Daniel Vetter, Chandan Uddaraju, Sean Paul, Daniel Mack
On 2019-04-25 07:03, Nicholas Mc Guire wrote:
> 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>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/msm: check for equals 0 only
2019-04-25 14:03 [PATCH] drm/msm: check for equals 0 only Nicholas Mc Guire
2019-04-25 22:52 ` [Freedreno] " Abhinav Kumar
@ 2019-04-26 0:02 ` Rob Clark
1 sibling, 0 replies; 3+ messages in thread
From: Rob Clark @ 2019-04-26 0:02 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Sean Paul, David Airlie, Daniel Vetter, Abhinav Kumar,
Jordan Crouse, Archit Taneja, Daniel Mack, Sibi Sankar,
Chandan Uddaraju, linux-arm-msm, dri-devel, freedreno,
Linux Kernel Mailing List
On Thu, Apr 25, 2019 at 7:09 AM Nicholas Mc Guire <hofrat@osadl.org> wrote:
>
> 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 ?
Thanks, I'll pull this in for -fixes
as far as get_maintainer.pl.. I'm not entirely sure.. we don't list
linux-kernel@vger.kernel.org explicitly, but neither do a lot of the
other driver entries. Possibly this is a oversight in the MAINTAINERS
entry? Either way, I guess I'd say that it isn't intentional.
BR,
-R
>
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-26 0:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 14:03 [PATCH] drm/msm: check for equals 0 only Nicholas Mc Guire
2019-04-25 22:52 ` [Freedreno] " Abhinav Kumar
2019-04-26 0:02 ` Rob Clark
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).