dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
To: Dan Carpenter
	<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
Cc: David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	Frank Min <Frank.Min-5C7GfCeVMHo@public.gmane.org>,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Chris Wilson
	<chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>,
	Xiangliang Yu <Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>,
	Leo Liu <leo.liu-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 1/2] drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()
Date: Sat, 30 Sep 2017 10:25:59 +0200	[thread overview]
Message-ID: <0b5a4cef-085d-bbeb-e673-79f8163a2e34@amd.com> (raw)
In-Reply-To: <20170930081328.kher7yumqzi2vsrg@mwanda>

Am 30.09.2017 um 10:13 schrieb Dan Carpenter:
> We shifted some code around in commit 9cca0b8e5df0 ("drm/amdgpu: move
> amdgpu_cs_sysvm_access_required into find_mapping") and now my static
> checker complains that "r" might not be initialized at the end of the
> function.  I've reviewed the code, and that seems possible, but it's
> also possible I may have missed something.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Good catches, Reviewed-by: Christian König <christian.koenig@amd.com> 
for both patches.

>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index b46280c1279f..2918de2f39ec 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -648,7 +648,7 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p, uint32_t ib_idx)
>   	uint32_t allocated = 0;
>   	uint32_t tmp, handle = 0;
>   	uint32_t *size = &tmp;
> -	int i, r, idx = 0;
> +	int i, r = 0, idx = 0;
>   
>   	p->job->vm = NULL;
>   	ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo);


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

  parent reply	other threads:[~2017-09-30  8:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30  8:13 [PATCH 1/2] drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs() Dan Carpenter
2017-09-30  8:14 ` [PATCH 2/2] drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories() Dan Carpenter
2017-09-30  8:25 ` Christian König [this message]
     [not found]   ` <0b5a4cef-085d-bbeb-e673-79f8163a2e34-5C7GfCeVMHo@public.gmane.org>
2017-11-08 19:53     ` [PATCH 1/2] drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs() Ernst Sjöstrand
2017-11-08 20:37       ` Alex Deucher

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=0b5a4cef-085d-bbeb-e673-79f8163a2e34@amd.com \
    --to=christian.koenig-5c7gfcevmho@public.gmane.org \
    --cc=Frank.Min-5C7GfCeVMHo@public.gmane.org \
    --cc=Jerry.Zhang-5C7GfCeVMHo@public.gmane.org \
    --cc=Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=leo.liu-5C7GfCeVMHo@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