[PATCH xf86-video-amdgpu 2/2] Fix warnings for unused variables

Alex Deucher alexdeucher at gmail.com
Wed Oct 28 11:17:37 PDT 2015


On Wed, Oct 28, 2015 at 9:24 AM, Jammy Zhou <Jammy.Zhou at amd.com> wrote:
> Remove some unused variables to fix the compiling warnings.
>
> Signed-off-by: Jammy Zhou <Jammy.Zhou at amd.com>

For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  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;
> 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;
> 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;
> --
> 1.9.1
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list