Commit 15e06bf6 authored by Grant Likely's avatar Grant Likely

irqdomain: Fix debugfs formatting

This patch fixes the irq_domain_mapping debugfs output to pad pointer
values with leading zeros so that pointer values are displayed
correctly.  Otherwise you get output similar to "0x 5e0000000000000".
Also, when the irq_domain is set to 'null'
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Cc: David Daney <david.daney@cavium.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
parent ac5830a3
...@@ -643,8 +643,8 @@ static int virq_debug_show(struct seq_file *m, void *private) ...@@ -643,8 +643,8 @@ static int virq_debug_show(struct seq_file *m, void *private)
void *data; void *data;
int i; int i;
seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq", seq_printf(m, "%-5s %-7s %-15s %-*s %s\n", "irq", "hwirq",
"chip name", "chip data", "domain name"); "chip name", 2 * sizeof(void *) + 2, "chip data", "domain name");
for (i = 1; i < nr_irqs; i++) { for (i = 1; i < nr_irqs; i++) {
desc = irq_to_desc(i); desc = irq_to_desc(i);
...@@ -667,7 +667,7 @@ static int virq_debug_show(struct seq_file *m, void *private) ...@@ -667,7 +667,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
seq_printf(m, "%-15s ", p); seq_printf(m, "%-15s ", p);
data = irq_desc_get_chip_data(desc); data = irq_desc_get_chip_data(desc);
seq_printf(m, "0x%16p ", data); seq_printf(m, data ? "0x%p " : " %p ", data);
if (desc->irq_data.domain && desc->irq_data.domain->of_node) if (desc->irq_data.domain && desc->irq_data.domain->of_node)
p = desc->irq_data.domain->of_node->full_name; p = desc->irq_data.domain->of_node->full_name;
......
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