Mark local functions 'static' in gralloc

To make further refactoring easier.

Bug: 128324105
Test: make
Change-Id: I1bdbb1d61667899e1a215757b98a6580c8edafed
Signed-off-by: Roman Kiryanov <rkir@google.com>
diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp
index 058ea03..3ce21c8 100644
--- a/system/gralloc/gralloc.cpp
+++ b/system/gralloc/gralloc.cpp
@@ -148,13 +148,13 @@
 static gralloc_memregions_t* s_memregions = NULL;
 static gralloc_dmaregion_t* s_grdma = NULL;
 
-void init_gralloc_memregions() {
+static void init_gralloc_memregions() {
     if (s_memregions) return;
     s_memregions = new gralloc_memregions_t;
     pthread_mutex_init(&s_memregions->lock, NULL);
 }
 
-void init_gralloc_dmaregion() {
+static void init_gralloc_dmaregion() {
     D("%s: call\n", __FUNCTION__);
     if (s_grdma) return;
 
@@ -169,7 +169,7 @@
     pthread_mutex_unlock(&s_grdma->lock);
 }
 
-void get_gralloc_dmaregion() {
+static void get_gralloc_dmaregion() {
     if (!s_grdma) return;
     pthread_mutex_lock(&s_grdma->lock);
     s_grdma->refcount++;
@@ -190,7 +190,7 @@
 // max dma size: 2x 4K rgba8888
 #define MAX_DMA_SIZE 66355200
 
-bool put_gralloc_dmaregion(uint32_t sz) {
+static bool put_gralloc_dmaregion(uint32_t sz) {
     if (!s_grdma) return false;
     pthread_mutex_lock(&s_grdma->lock);
     D("%s: call. refcount before: %u\n", __FUNCTION__, s_grdma->refcount);
@@ -210,7 +210,7 @@
     return shouldDelete;
 }
 
-void gralloc_dmaregion_register_ashmem(uint32_t sz) {
+static void gralloc_dmaregion_register_ashmem(uint32_t sz) {
     if (!s_grdma) return;
     pthread_mutex_lock(&s_grdma->lock);
     D("%s: for sz %u, refcount %u", __FUNCTION__, sz, s_grdma->refcount);
@@ -231,7 +231,7 @@
     pthread_mutex_unlock(&s_grdma->lock);
 }
 
-void get_mem_region(void* ashmemBase) {
+static void get_mem_region(void* ashmemBase) {
     init_gralloc_memregions();
     D("%s: call for %p", __FUNCTION__, ashmemBase);
     MemRegionInfo lookup;
@@ -249,7 +249,7 @@
     pthread_mutex_unlock(&s_memregions->lock);
 }
 
-bool put_mem_region(void* ashmemBase) {
+static bool put_mem_region(void* ashmemBase) {
     init_gralloc_memregions();
     D("%s: call for %p", __FUNCTION__, ashmemBase);
     MemRegionInfo lookup;
@@ -271,7 +271,7 @@
     }
 }
 
-void dump_regions() {
+static void dump_regions() {
     init_gralloc_memregions();
     mem_region_handle_t curr = s_memregions->ashmemRegions.begin();
     std::stringstream res;