Commit 6c01aa13 authored by Yuanzheng Song's avatar Yuanzheng Song Committed by Sumit Semwal

dma-buf: add the name field to the table header

'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf
Objects' information when the CONFIG_DEBUG_FS=y.
However, the printed table header information does not contain
the name field. So we need to add the name field to the table
header and use the '<none>' to replace the empty buf_obj->name.
Signed-off-by: default avatarYuanzheng Song <songyuanzheng@huawei.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220428063924.3570409-1-songyuanzheng@huawei.com
parent 35079323
...@@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused) ...@@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
return ret; return ret;
seq_puts(s, "\nDma-buf Objects:\n"); seq_puts(s, "\nDma-buf Objects:\n");
seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\n", seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
"size", "flags", "mode", "count", "ino"); "size", "flags", "mode", "count", "ino");
list_for_each_entry(buf_obj, &db_list.head, list_node) { list_for_each_entry(buf_obj, &db_list.head, list_node) {
...@@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused) ...@@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
file_count(buf_obj->file), file_count(buf_obj->file),
buf_obj->exp_name, buf_obj->exp_name,
file_inode(buf_obj->file)->i_ino, file_inode(buf_obj->file)->i_ino,
buf_obj->name ?: ""); buf_obj->name ?: "<none>");
spin_unlock(&buf_obj->name_lock); spin_unlock(&buf_obj->name_lock);
dma_resv_describe(buf_obj->resv, s); dma_resv_describe(buf_obj->resv, s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment