> -----Original Message-----
> From: amd-gfx [mailto:[email protected]] On Behalf
> Of Christian König
> Sent: Thursday, July 27, 2017 11:44 AM
> To: [email protected]
> Subject: [PATCH 4/8] drm/amdgpu: shadow and mn list are mutal exclusive

mutually

> 
> From: Christian König <[email protected]>
> 
> Save some memory because only on of those is used at all times.

one

> 
> TODO: Should we use an union here or just a single field?

I think the union is better since it makes it clear when we use each version.  
With the above fixes:
Reviewed-by: Alex Deucher <[email protected]>

> 
> Signed-off-by: Christian König <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
> index a401fe3..3b92d52 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
> @@ -87,8 +87,11 @@ struct amdgpu_bo {
> 
>       struct ttm_bo_kmap_obj          dma_buf_vmap;
>       struct amdgpu_mn                *mn;
> -     struct list_head                mn_list;
> -     struct list_head                shadow_list;
> +
> +     union {
> +             struct list_head        mn_list;
> +             struct list_head        shadow_list;
> +     };
>  };
> 
>  /**
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to