aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/android/binder.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 538ebe213129..24456a0de6b2 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -2880,7 +2880,6 @@ static int binder_release(struct inode *nodp, struct file *filp)
2880 2880
2881static void binder_deferred_release(struct binder_proc *proc) 2881static void binder_deferred_release(struct binder_proc *proc)
2882{ 2882{
2883 struct hlist_node *pos;
2884 struct binder_transaction *t; 2883 struct binder_transaction *t;
2885 struct rb_node *n; 2884 struct rb_node *n;
2886 int threads, nodes, incoming_refs, outgoing_refs, buffers, active_transactions, page_count; 2885 int threads, nodes, incoming_refs, outgoing_refs, buffers, active_transactions, page_count;
@@ -2924,7 +2923,7 @@ static void binder_deferred_release(struct binder_proc *proc)
2924 node->local_weak_refs = 0; 2923 node->local_weak_refs = 0;
2925 hlist_add_head(&node->dead_node, &binder_dead_nodes); 2924 hlist_add_head(&node->dead_node, &binder_dead_nodes);
2926 2925
2927 hlist_for_each_entry(ref, pos, &node->refs, node_entry) { 2926 hlist_for_each_entry(ref, &node->refs, node_entry) {
2928 incoming_refs++; 2927 incoming_refs++;
2929 if (ref->death) { 2928 if (ref->death) {
2930 death++; 2929 death++;
@@ -3156,12 +3155,11 @@ static void print_binder_thread(struct seq_file *m,
3156static void print_binder_node(struct seq_file *m, struct binder_node *node) 3155static void print_binder_node(struct seq_file *m, struct binder_node *node)
3157{ 3156{
3158 struct binder_ref *ref; 3157 struct binder_ref *ref;
3159 struct hlist_node *pos;
3160 struct binder_work *w; 3158 struct binder_work *w;
3161 int count; 3159 int count;
3162 3160
3163 count = 0; 3161 count = 0;
3164 hlist_for_each_entry(ref, pos, &node->refs, node_entry) 3162 hlist_for_each_entry(ref, &node->refs, node_entry)
3165 count++; 3163 count++;
3166 3164
3167 seq_printf(m, " node %d: u%p c%p hs %d hw %d ls %d lw %d is %d iw %d", 3165 seq_printf(m, " node %d: u%p c%p hs %d hw %d ls %d lw %d is %d iw %d",
@@ -3171,7 +3169,7 @@ static void print_binder_node(struct seq_file *m, struct binder_node *node)
3171 node->internal_strong_refs, count); 3169 node->internal_strong_refs, count);
3172 if (count) { 3170 if (count) {
3173 seq_puts(m, " proc"); 3171 seq_puts(m, " proc");
3174 hlist_for_each_entry(ref, pos, &node->refs, node_entry) 3172 hlist_for_each_entry(ref, &node->refs, node_entry)
3175 seq_printf(m, " %d", ref->proc->pid); 3173 seq_printf(m, " %d", ref->proc->pid);
3176 } 3174 }
3177 seq_puts(m, "\n"); 3175 seq_puts(m, "\n");
@@ -3369,7 +3367,6 @@ static void print_binder_proc_stats(struct seq_file *m,
3369static int binder_state_show(struct seq_file *m, void *unused) 3367static int binder_state_show(struct seq_file *m, void *unused)
3370{ 3368{
3371 struct binder_proc *proc; 3369 struct binder_proc *proc;
3372 struct hlist_node *pos;
3373 struct binder_node *node; 3370 struct binder_node *node;
3374 int do_lock = !binder_debug_no_lock; 3371 int do_lock = !binder_debug_no_lock;
3375 3372
@@ -3380,10 +3377,10 @@ static int binder_state_show(struct seq_file *m, void *unused)
3380 3377
3381 if (!hlist_empty(&binder_dead_nodes)) 3378 if (!hlist_empty(&binder_dead_nodes))
3382 seq_puts(m, "dead nodes:\n"); 3379 seq_puts(m, "dead nodes:\n");
3383 hlist_for_each_entry(node, pos, &binder_dead_nodes, dead_node) 3380 hlist_for_each_entry(node, &binder_dead_nodes, dead_node)
3384 print_binder_node(m, node); 3381 print_binder_node(m, node);
3385 3382
3386 hlist_for_each_entry(proc, pos, &binder_procs, proc_node) 3383 hlist_for_each_entry(proc, &binder_procs, proc_node)
3387 print_binder_proc(m, proc, 1); 3384 print_binder_proc(m, proc, 1);
3388 if (do_lock) 3385 if (do_lock)
3389 binder_unlock(__func__); 3386 binder_unlock(__func__);
@@ -3393,7 +3390,6 @@ static int binder_state_show(struct seq_file *m, void *unused)
3393static int binder_stats_show(struct seq_file *m, void *unused) 3390static int binder_stats_show(struct seq_file *m, void *unused)
3394{ 3391{
3395 struct binder_proc *proc; 3392 struct binder_proc *proc;
3396 struct hlist_node *pos;
3397 int do_lock = !binder_debug_no_lock; 3393 int do_lock = !binder_debug_no_lock;
3398 3394
3399 if (do_lock) 3395 if (do_lock)
@@ -3403,7 +3399,7 @@ static int binder_stats_show(struct seq_file *m, void *unused)
3403 3399
3404 print_binder_stats(m, "", &binder_stats); 3400 print_binder_stats(m, "", &binder_stats);
3405 3401
3406 hlist_for_each_entry(proc, pos, &binder_procs, proc_node) 3402 hlist_for_each_entry(proc, &binder_procs, proc_node)
3407 print_binder_proc_stats(m, proc); 3403 print_binder_proc_stats(m, proc);
3408 if (do_lock) 3404 if (do_lock)
3409 binder_unlock(__func__); 3405 binder_unlock(__func__);
@@ -3413,14 +3409,13 @@ static int binder_stats_show(struct seq_file *m, void *unused)
3413static int binder_transactions_show(struct seq_file *m, void *unused) 3409static int binder_transactions_show(struct seq_file *m, void *unused)
3414{ 3410{
3415 struct binder_proc *proc; 3411 struct binder_proc *proc;
3416 struct hlist_node *pos;
3417 int do_lock = !binder_debug_no_lock; 3412 int do_lock = !binder_debug_no_lock;
3418 3413
3419 if (do_lock) 3414 if (do_lock)
3420 binder_lock(__func__); 3415 binder_lock(__func__);
3421 3416
3422 seq_puts(m, "binder transactions:\n"); 3417 seq_puts(m, "binder transactions:\n");
3423 hlist_for_each_entry(proc, pos, &binder_procs, proc_node) 3418 hlist_for_each_entry(proc, &binder_procs, proc_node)
3424 print_binder_proc(m, proc, 0); 3419 print_binder_proc(m, proc, 0);
3425 if (do_lock) 3420 if (do_lock)
3426 binder_unlock(__func__); 3421 binder_unlock(__func__);