summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Orzel <michal.orzel@amd.com>2023-05-11 15:02:18 +0200
committerJulien Grall <jgrall@amazon.com>2023-05-15 10:11:44 +0100
commitb8be19ce432a2edd69c0673768a0beeec77f795a (patch)
treed6d9b80156fa304c89088871e05c47e593a62d38
parent5b34e896a3c5fab474e5455d3a74932d46eb756a (diff)
downloadxen-b8be19ce432a2edd69c0673768a0beeec77f795a.tar.gz
xen/arm: domain_build: Fix format specifiers in map_{dt_}irq_to_domain()
IRQ is of unsigned type so %u should be used. When printing domain id, %pd should be the correct format to maintain the consistency. Also, wherever possible, reduce the number of split lines for printk(). Signed-off-by: Michal Orzel <michal.orzel@amd.com> Reviewed-by: Henry Wang <Henry.Wang@arm.com> Reviewed-by: Julien Grall <jgrall@amazon.com> Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
-rw-r--r--xen/arch/arm/domain_build.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 9dee1bb8f2..71f307a572 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -2265,8 +2265,7 @@ int __init map_irq_to_domain(struct domain *d, unsigned int irq,
res = irq_permit_access(d, irq);
if ( res )
{
- printk(XENLOG_ERR "Unable to permit to dom%u access to IRQ %u\n",
- d->domain_id, irq);
+ printk(XENLOG_ERR "Unable to permit to %pd access to IRQ %u\n", d, irq);
return res;
}
@@ -2282,8 +2281,7 @@ int __init map_irq_to_domain(struct domain *d, unsigned int irq,
res = route_irq_to_guest(d, irq, irq, devname);
if ( res < 0 )
{
- printk(XENLOG_ERR "Unable to map IRQ%"PRId32" to dom%d\n",
- irq, d->domain_id);
+ printk(XENLOG_ERR "Unable to map IRQ%u to %pd\n", irq, d);
return res;
}
}
@@ -2303,8 +2301,7 @@ static int __init map_dt_irq_to_domain(const struct dt_device_node *dev,
if ( irq < NR_LOCAL_IRQS )
{
- printk(XENLOG_ERR "%s: IRQ%"PRId32" is not a SPI\n",
- dt_node_name(dev), irq);
+ printk(XENLOG_ERR "%s: IRQ%u is not a SPI\n", dt_node_name(dev), irq);
return -EINVAL;
}
@@ -2312,9 +2309,8 @@ static int __init map_dt_irq_to_domain(const struct dt_device_node *dev,
res = irq_set_spi_type(irq, dt_irq->type);
if ( res )
{
- printk(XENLOG_ERR
- "%s: Unable to setup IRQ%"PRId32" to dom%d\n",
- dt_node_name(dev), irq, d->domain_id);
+ printk(XENLOG_ERR "%s: Unable to setup IRQ%u to %pd\n",
+ dt_node_name(dev), irq, d);
return res;
}