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

Jammy Zhou Jammy.Zhou at amd.com
Wed Oct 28 06:24:30 PDT 2015


Remove some unused variables to fix the compiling warnings.

Signed-off-by: Jammy Zhou <Jammy.Zhou 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



More information about the xorg-driver-ati mailing list