hikey: gralloc: Clean up warnings am: 04a610a134 am: 53adfdeafe
am: 6719b82a29

Change-Id: Iffb27892a6eaaa16427afed1f26d1ece7ea86435
diff --git a/gralloc/alloc_device.cpp b/gralloc/alloc_device.cpp
index 89202ef..488e47c 100644
--- a/gralloc/alloc_device.cpp
+++ b/gralloc/alloc_device.cpp
@@ -574,8 +574,6 @@
 	else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION)
 	{
 #if GRALLOC_ARM_DMA_BUF_MODULE
-		private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module);
-
 		/* Buffer might be unregistered so we need to check for invalid ump handle*/
 		if (0 != hnd->base)
 		{
diff --git a/gralloc/gralloc_module.cpp b/gralloc/gralloc_module.cpp
index 73e5c17..38ed3da 100644
--- a/gralloc/gralloc_module.cpp
+++ b/gralloc/gralloc_module.cpp
@@ -136,7 +136,6 @@
 	else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION)
 	{
 #if GRALLOC_ARM_DMA_BUF_MODULE
-		int ret;
 		unsigned char *mappedAddress;
 		size_t size = hnd->size;
 		hw_module_t *pmodule = NULL;
@@ -327,9 +326,6 @@
 	}
 
 	private_handle_t *hnd = (private_handle_t *)handle;
-	int32_t current_value;
-	int32_t new_value;
-	int retry;
 
 	if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_UMP && hnd->writeOwner)
 	{
@@ -343,18 +339,11 @@
 	{
 #if GRALLOC_ARM_DMA_BUF_MODULE
 		hw_module_t *pmodule = NULL;
-		private_module_t *m = NULL;
 
-		if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, (const hw_module_t **)&pmodule) == 0)
-		{
-			m = reinterpret_cast<private_module_t *>(pmodule);
-			//ion_sync_fd(m->ion_client, hnd->share_fd);
-		}
-		else
+		if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, (const hw_module_t **)&pmodule) != 0)
 		{
 			AERR("Couldnot get gralloc module for handle 0x%p\n", handle);
 		}
-
 #endif
 	}