On 28.10.2015 22:24, Jammy Zhou wrote:
> Remove some unused variables to fix the compiling warnings.
> 
> Signed-off-by: Jammy Zhou <[email protected]>
> ---
>  src/amdgpu_dri3.c   | 2 --
>  src/amdgpu_glamor.c | 2 --
>  src/amdgpu_kms.c    | 6 ++++--
>  3 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/src/amdgpu_dri3.c b/src/amdgpu_dri3.c
> index a89421e..ad5734f 100644
> --- a/src/amdgpu_dri3.c
> +++ b/src/amdgpu_dri3.c
> @@ -130,8 +130,6 @@ static int amdgpu_dri3_fd_from_pixmap(ScreenPtr screen,
>                                     CARD16 *stride,
>                                     CARD32 *size)
>  {
> -     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
> -     AMDGPUInfoPtr info = AMDGPUPTR(scrn);
>       struct amdgpu_buffer *bo;
>       struct amdgpu_bo_info bo_info;
>       uint32_t fd;

These are used when USE_GLAMOR is defined.


> diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
> index f994df4..fb0f8ff 100644
> --- a/src/amdgpu_glamor.c
> +++ b/src/amdgpu_glamor.c
> @@ -81,8 +81,6 @@ Bool amdgpu_glamor_create_screen_resources(ScreenPtr screen)
>  Bool amdgpu_glamor_pre_init(ScrnInfoPtr scrn)
>  {
>       AMDGPUInfoPtr info = AMDGPUPTR(scrn);
> -     pointer glamor_module;
> -     CARD32 version;
>  
>       if (!info->dri2.available)
>               return FALSE;

These are used unconditionally.

I guess you tested this patch with --disable-glamor?


> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
> index 32a34cb..91aba2f 100644
> --- a/src/amdgpu_kms.c
> +++ b/src/amdgpu_kms.c
> @@ -944,10 +944,11 @@ void AMDGPUUnblank(ScrnInfoPtr pScrn)
>  static Bool amdgpu_set_drm_master(ScrnInfoPtr pScrn)
>  {
>       AMDGPUInfoPtr info  = AMDGPUPTR(pScrn);
> -     AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
>       int err;
>  
>  #ifdef XF86_PDEV_SERVER_FD
> +     AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
> +
>       if (pAMDGPUEnt->platform_dev &&
>           (pAMDGPUEnt->platform_dev->flags & XF86_PDEV_SERVER_FD))
>               return TRUE;
> @@ -963,9 +964,10 @@ static Bool amdgpu_set_drm_master(ScrnInfoPtr pScrn)
>  static void amdgpu_drop_drm_master(ScrnInfoPtr pScrn)
>  {
>       AMDGPUInfoPtr  info  = AMDGPUPTR(pScrn);
> -     AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
>  
>  #ifdef XF86_PDEV_SERVER_FD
> +     AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
> +
>       if (pAMDGPUEnt->platform_dev &&
>           (pAMDGPUEnt->platform_dev->flags & XF86_PDEV_SERVER_FD))
>               return;
> 

These look good, but will be obsoleted by pending changes of mine which
remove info->dri2.drm_fd and info->drmmode->fd in favour of pAMGPUEnt->fd.

It's probably best if I send out a new series combining your changes and
mine, if you're okay with that.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
xorg-driver-ati mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-driver-ati

Reply via email to