hikey: gralloc: Clean up warnings
Test: Manual
Change-Id: I331536fe42a7ba3b580dfa8bd899d99d72093a67
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
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 70d2c69..d0cb080 100644
--- a/gralloc/gralloc_module.cpp
+++ b/gralloc/gralloc_module.cpp
@@ -135,7 +135,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;
@@ -326,9 +325,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)
{
@@ -342,18 +338,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
}