hlist: drop the node parameter from iterators
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / android / binder.c
index 2d12e8a1f82ee06b89f8be1127e644c16ead8994..24456a0de6b2143f3ceadff6edc26c48152d9701 100644 (file)
@@ -2880,7 +2880,6 @@ static int binder_release(struct inode *nodp, struct file *filp)
 
 static void binder_deferred_release(struct binder_proc *proc)
 {
-       struct hlist_node *pos;
        struct binder_transaction *t;
        struct rb_node *n;
        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)
                        node->local_weak_refs = 0;
                        hlist_add_head(&node->dead_node, &binder_dead_nodes);
 
-                       hlist_for_each_entry(ref, pos, &node->refs, node_entry) {
+                       hlist_for_each_entry(ref, &node->refs, node_entry) {
                                incoming_refs++;
                                if (ref->death) {
                                        death++;
@@ -3156,12 +3155,11 @@ static void print_binder_thread(struct seq_file *m,
 static void print_binder_node(struct seq_file *m, struct binder_node *node)
 {
        struct binder_ref *ref;
-       struct hlist_node *pos;
        struct binder_work *w;
        int count;
 
        count = 0;
-       hlist_for_each_entry(ref, pos, &node->refs, node_entry)
+       hlist_for_each_entry(ref, &node->refs, node_entry)
                count++;
 
        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)
                   node->internal_strong_refs, count);
        if (count) {
                seq_puts(m, " proc");
-               hlist_for_each_entry(ref, pos, &node->refs, node_entry)
+               hlist_for_each_entry(ref, &node->refs, node_entry)
                        seq_printf(m, " %d", ref->proc->pid);
        }
        seq_puts(m, "\n");
@@ -3227,7 +3225,7 @@ static void print_binder_proc(struct seq_file *m,
                m->count = start_pos;
 }
 
-static const char *binder_return_strings[] = {
+static const char * const binder_return_strings[] = {
        "BR_ERROR",
        "BR_OK",
        "BR_TRANSACTION",
@@ -3248,7 +3246,7 @@ static const char *binder_return_strings[] = {
        "BR_FAILED_REPLY"
 };
 
-static const char *binder_command_strings[] = {
+static const char * const binder_command_strings[] = {
        "BC_TRANSACTION",
        "BC_REPLY",
        "BC_ACQUIRE_RESULT",
@@ -3268,7 +3266,7 @@ static const char *binder_command_strings[] = {
        "BC_DEAD_BINDER_DONE"
 };
 
-static const char *binder_objstat_strings[] = {
+static const char * const binder_objstat_strings[] = {
        "proc",
        "thread",
        "node",
@@ -3369,7 +3367,6 @@ static void print_binder_proc_stats(struct seq_file *m,
 static int binder_state_show(struct seq_file *m, void *unused)
 {
        struct binder_proc *proc;
-       struct hlist_node *pos;
        struct binder_node *node;
        int do_lock = !binder_debug_no_lock;
 
@@ -3380,10 +3377,10 @@ static int binder_state_show(struct seq_file *m, void *unused)
 
        if (!hlist_empty(&binder_dead_nodes))
                seq_puts(m, "dead nodes:\n");
-       hlist_for_each_entry(node, pos, &binder_dead_nodes, dead_node)
+       hlist_for_each_entry(node, &binder_dead_nodes, dead_node)
                print_binder_node(m, node);
 
-       hlist_for_each_entry(proc, pos, &binder_procs, proc_node)
+       hlist_for_each_entry(proc, &binder_procs, proc_node)
                print_binder_proc(m, proc, 1);
        if (do_lock)
                binder_unlock(__func__);
@@ -3393,7 +3390,6 @@ static int binder_state_show(struct seq_file *m, void *unused)
 static int binder_stats_show(struct seq_file *m, void *unused)
 {
        struct binder_proc *proc;
-       struct hlist_node *pos;
        int do_lock = !binder_debug_no_lock;
 
        if (do_lock)
@@ -3403,7 +3399,7 @@ static int binder_stats_show(struct seq_file *m, void *unused)
 
        print_binder_stats(m, "", &binder_stats);
 
-       hlist_for_each_entry(proc, pos, &binder_procs, proc_node)
+       hlist_for_each_entry(proc, &binder_procs, proc_node)
                print_binder_proc_stats(m, proc);
        if (do_lock)
                binder_unlock(__func__);
@@ -3413,14 +3409,13 @@ static int binder_stats_show(struct seq_file *m, void *unused)
 static int binder_transactions_show(struct seq_file *m, void *unused)
 {
        struct binder_proc *proc;
-       struct hlist_node *pos;
        int do_lock = !binder_debug_no_lock;
 
        if (do_lock)
                binder_lock(__func__);
 
        seq_puts(m, "binder transactions:\n");
-       hlist_for_each_entry(proc, pos, &binder_procs, proc_node)
+       hlist_for_each_entry(proc, &binder_procs, proc_node)
                print_binder_proc(m, proc, 0);
        if (do_lock)
                binder_unlock(__func__);