[PATCH 08/13] android: binder: add function for logging failed transactions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux