lkml.org 
[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Freedreno] [PATCH] drm/msm: check for equals 0 only
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);

\
 
 \ /
  Last update: 2019-04-26 00:53    [W:0.038 / U:2.368 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site