lkml.org 
[lkml]   [2014]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] staging: android: binder: use stack for locally used variable
Date
The variable `binder_debugfs_dir_entry_root` is declared as static
global variable although it is accessed from init function only. Declare
it as init function's local variable because it would be better to read
and memory efficiency.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
drivers/staging/android/binder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index b23cbc9..78de730 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -49,7 +49,6 @@ static HLIST_HEAD(binder_procs);
static HLIST_HEAD(binder_deferred_list);
static HLIST_HEAD(binder_dead_nodes);

-static struct dentry *binder_debugfs_dir_entry_root;
static struct dentry *binder_debugfs_dir_entry_proc;
static struct binder_node *binder_context_mgr_node;
static kuid_t binder_context_mgr_uid = INVALID_UID;
@@ -3514,6 +3513,7 @@ BINDER_DEBUG_ENTRY(transaction_log);

static int __init binder_init(void)
{
+ struct dentry *binder_debugfs_dir_entry_root;
int ret;

binder_deferred_workqueue = create_singlethread_workqueue("binder");
--
1.8.3.2


\
 
 \ /
  Last update: 2014-02-18 13:01    [W:0.090 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site