Add another helper function that adds log entries to failed log. Signed-off-by: Riley Andrews <riandrews@xxxxxxxxxxx> --- drivers/android/binder.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index ed94121..f7f2217 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -211,6 +211,16 @@ static struct binder_transaction_log_entry *binder_transaction_log_add( return e; } +static void binder_transaction_log_add_copy( + struct binder_transaction_log *log, + struct binder_transaction_log_entry *entry) +{ + struct binder_transaction_log_entry *failed; + + failed = binder_transaction_log_add(log); + *failed = *entry; +} + struct binder_work { struct list_head entry; enum { @@ -1827,13 +1837,7 @@ err_invalid_target_handle: proc->pid, thread->pid, return_error, (u64)tr->data_size, (u64)tr->offsets_size); - { - struct binder_transaction_log_entry *fe; - - fe = binder_transaction_log_add(&binder_transaction_log_failed); - *fe = *e; - } - + binder_transaction_log_add_copy(&binder_transaction_log_failed, e); BUG_ON(thread->return_error != BR_OK); if (in_reply_to) { thread->return_error = BR_TRANSACTION_COMPLETE; -- 2.2.0.rc0.207.ga3a616c _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel