binder: Use LIST_HEAD() to initialize on stack list head
PATCH 1/1 binder: Use LIST_HEAD() to initialize on stack list head
Use LIST_HEAD to initialize on stack list head. No intentional functional impact.
Change generated with below coccinelle script:
@@
identifier name;
@@
- struct list_head name;
+ LIST_HEAD(name);
... when != name
- INIT_LIST_HEAD(&name);
Signed-off-by Jisheng Zhang <[email protected]>
--- drivers/android/binder.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/android/binder.c +2 -4
@@ -3080,12 +3080,10 @@ static void binder_transaction(struct binder_proc *proc,int t_debug_id =atomic_inc_return (&binder_last_id);ktime_t t_start_time =ktime_get ();struct lsm_context lsmctx = { }; -struct list_head sgc_head; -struct list_head pf_head; +LIST_HEAD (sgc_head); +LIST_HEAD (pf_head);const void __user *user_buffer = (const void __user *) (uintptr_t )tr->data.ptr.buffer; -INIT_LIST_HEAD (&sgc_head); -INIT_LIST_HEAD (&pf_head); e =binder_transaction_log_add (&binder_transaction_log); e->debug_id = t_debug_id;
Signature · 1 line
2.53.0