ion: cma: Update print_debug function

Change-Id: Ia659c05926c39e23307339e0976d9e72f808473a
This commit is contained in:
Artem Borisov 2018-08-23 00:24:46 +00:00
parent f35a335e0b
commit b4569e784e

View file

@ -322,22 +322,19 @@ int ion_cma_cache_ops(struct ion_heap *heap,
} }
static int ion_cma_print_debug(struct ion_heap *heap, struct seq_file *s, static int ion_cma_print_debug(struct ion_heap *heap, struct seq_file *s,
const struct rb_root *mem_map) const struct list_head *mem_map)
{ {
if (mem_map) { if (mem_map) {
struct rb_node *n; struct mem_map_data *data;
seq_printf(s, "\nMemory Map\n"); seq_printf(s, "\nMemory Map\n");
seq_printf(s, "%16.s %14.s %14.s %14.s\n", seq_printf(s, "%16.s %14.s %14.s %14.s\n",
"client", "start address", "end address", "client", "start address", "end address",
"size (hex)"); "size (hex)");
for (n = rb_first(mem_map); n; n = rb_next(n)) { list_for_each_entry(data, mem_map, node) {
struct mem_map_data *data =
rb_entry(n, struct mem_map_data, node);
const char *client_name = "(null)"; const char *client_name = "(null)";
if (data->client_name) if (data->client_name)
client_name = data->client_name; client_name = data->client_name;