dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andrey Grodzovsky
	<andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] drm/sched: Fix static checker warning for potential NULL ptr
Date: Wed, 22 May 2019 16:08:23 +0200	[thread overview]
Message-ID: <307e40c1-a25a-42f4-4d19-cffdb521974e@gmail.com> (raw)
In-Reply-To: <1558533443-7795-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>

Am 22.05.19 um 15:57 schrieb Andrey Grodzovsky:
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/scheduler/sched_main.c | 17 +++++++++--------
>   1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 90d7a82..ec7faca 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -286,16 +286,17 @@ static void drm_sched_job_timedout(struct work_struct *work)
>   	job = list_first_entry_or_null(&sched->ring_mirror_list,
>   				       struct drm_sched_job, node);
>   
> -	if (job)
> +	if (job) {
>   		job->sched->ops->timedout_job(job);
>   
> -	/*
> -	 * Guilty job did complete and hence needs to be manually removed
> -	 * See drm_sched_stop doc.
> -	 */
> -	if (sched->free_guilty) {
> -		job->sched->ops->free_job(job);
> -		sched->free_guilty = false;
> +		/*
> +		 * Guilty job did complete and hence needs to be manually removed
> +		 * See drm_sched_stop doc.
> +		 */
> +		if (sched->free_guilty) {
> +			job->sched->ops->free_job(job);
> +			sched->free_guilty = false;
> +		}
>   	}
>   
>   	spin_lock_irqsave(&sched->job_list_lock, flags);

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2019-05-22 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 13:57 [PATCH] drm/sched: Fix static checker warning for potential NULL ptr Andrey Grodzovsky
     [not found] ` <1558533443-7795-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2019-05-22 14:08   ` Christian König [this message]

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=307e40c1-a25a-42f4-4d19-cffdb521974e@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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).