Re: [PATCH v2] drm/amdgpu: Fix potential uninitialized use of 'idle' in amdgpu_ids.c

2018-02-11 Thread Christian König

Am 09.02.2018 um 21:31 schrieb Alex Deucher:

On Fri, Feb 9, 2018 at 1:49 PM, Harry Wentland  wrote:

v2: Use NULL and reverse christmas tree ordering

Signed-off-by: Harry Wentland 

Reviewed-by: Alex Deucher 


Reviewed-by: Christian König 




---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
index 7d2805729c20..563e74755aab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
@@ -406,7 +406,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct 
amdgpu_ring *ring,
 struct amdgpu_device *adev = ring->adev;
 unsigned vmhub = ring->funcs->vmhub;
 struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
-   struct amdgpu_vmid *id, *idle;
+   struct amdgpu_vmid *idle = NULL;
+   struct amdgpu_vmid *id = NULL;
 int r = 0;

 mutex_lock(&id_mgr->lock);
--
2.14.1

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

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


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


Re: [PATCH v2] drm/amdgpu: Fix potential uninitialized use of 'idle' in amdgpu_ids.c

2018-02-09 Thread Alex Deucher
On Fri, Feb 9, 2018 at 1:49 PM, Harry Wentland  wrote:
> v2: Use NULL and reverse christmas tree ordering
>
> Signed-off-by: Harry Wentland 

Reviewed-by: Alex Deucher 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> index 7d2805729c20..563e74755aab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> @@ -406,7 +406,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct 
> amdgpu_ring *ring,
> struct amdgpu_device *adev = ring->adev;
> unsigned vmhub = ring->funcs->vmhub;
> struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
> -   struct amdgpu_vmid *id, *idle;
> +   struct amdgpu_vmid *idle = NULL;
> +   struct amdgpu_vmid *id = NULL;
> int r = 0;
>
> mutex_lock(&id_mgr->lock);
> --
> 2.14.1
>
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH v2] drm/amdgpu: Fix potential uninitialized use of 'idle' in amdgpu_ids.c

2018-02-09 Thread Harry Wentland
v2: Use NULL and reverse christmas tree ordering

Signed-off-by: Harry Wentland 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
index 7d2805729c20..563e74755aab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
@@ -406,7 +406,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct 
amdgpu_ring *ring,
struct amdgpu_device *adev = ring->adev;
unsigned vmhub = ring->funcs->vmhub;
struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
-   struct amdgpu_vmid *id, *idle;
+   struct amdgpu_vmid *idle = NULL;
+   struct amdgpu_vmid *id = NULL;
int r = 0;
 
mutex_lock(&id_mgr->lock);
-- 
2.14.1

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