mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
ANDROID: binder: fix ptrdiff_t printk-format issue
The correct printk format specifier when calculating buffer offsets
should be "%tx" as it is a pointer difference (a.k.a ptrdiff_t). This
fixes some W=1 build warnings reported by the kernel test robot.
Bug: 329799092
Fixes: 63f7ddea2e ("ANDROID: binder: fix KMI-break due to address type change")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401100511.A4BKMwoq-lkp@intel.com/
Change-Id: Iaa87433897b507c47fe8601464445cb6de4b61db
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
@@ -6206,7 +6206,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
|
||||
}
|
||||
if (buffer->target_node)
|
||||
seq_printf(m, " node %d", buffer->target_node->debug_id);
|
||||
seq_printf(m, " size %zd:%zd offset %lx\n",
|
||||
seq_printf(m, " size %zd:%zd offset %tx\n",
|
||||
buffer->data_size, buffer->offsets_size,
|
||||
proc->alloc.buffer - buffer->user_data);
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ void binder_alloc_print_allocated(struct seq_file *m,
|
||||
binder_alloc_lock(alloc);
|
||||
for (n = rb_first(&alloc->allocated_buffers); n; n = rb_next(n)) {
|
||||
buffer = rb_entry(n, struct binder_buffer, rb_node);
|
||||
seq_printf(m, " buffer %d: %lx size %zd:%zd:%zd %s\n",
|
||||
seq_printf(m, " buffer %d: %tx size %zd:%zd:%zd %s\n",
|
||||
buffer->debug_id,
|
||||
buffer->user_data - alloc->buffer,
|
||||
buffer->data_size, buffer->offsets_size,
|
||||
|
||||
Reference in New Issue
Block a user