From baedff4e054808aa04401fc280e5643052e69cca Mon Sep 17 00:00:00 2001 From: zhizhimeimei6 Date: Thu, 9 Jun 2022 20:43:40 +0800 Subject: [PATCH] binder: fix check build error: undefined reference to '__aeabi_uldivmod' ohos inclusion category: bugfix issue: #I5BLBQ CVE: NA ----------------- Signed-off-by: zhizhimeimei6 --- drivers/android/binder.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index db4bdb65be9f..153b3dbcf661 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -6189,21 +6189,24 @@ static void print_binder_transaction_brief_ilocked( int from_pid = 0; int from_tid = 0; int to_pid = 0; + u64 sec; + u32 nsec; spin_lock(&t->lock); to_proc = t->to_proc; from_pid = t->from ? (t->from->proc ? t->from->proc->pid : 0) : t->async_from_pid; from_tid = t->from ? t->from->pid : t->async_from_tid; to_pid = to_proc ? to_proc->pid : 0; + sec = div_u64_rem((timestamp - t->timestamp), 1000000000, &nsec); seq_printf(m, - "%s%d:%d to %d:%d code %x wait:%lld.%lld s\n", + "%s%d:%d to %d:%d code %x wait:%llu.%u s\n", prefix, from_pid, from_tid, to_pid, t->to_thread ? t->to_thread->pid : 0, t->code, - timestamp > t->timestamp ? (timestamp - t->timestamp) / 1000000000 : 0, - timestamp > t->timestamp ? (timestamp - t->timestamp) % 1000000000 : 0); + timestamp > t->timestamp ? sec : 0, + timestamp > t->timestamp ? nsec : 0); spin_unlock(&t->lock); } -- Gitee