[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen/arm: domain_build: Propagate return code of map_irq_to_domain()
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Thu, 11 May 2023 13:25:31 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o3ofw8QlulpeonaWRaWUpbP/xOt0kD1++n4rLpxTc3I=; b=fntYdlp4umvT14KNV4f1eWwuk+7LkzSAHjb7NFp7AMqiGaRVpk8Qy61byVPsPjq8/wfDv5oi+mD7D/79zLsfNcE7DD9HDma7iaa8J3dJBNRJI7FFgI8W610FIKUtQj0RhBzawzFFv/veAoEMMROiSGypYkSL3Swl/PWJ8qOPw4QANhT/hTZlNwpsY8ulEEVXPtUDVRnWNjZBl88LuBN7Py0Dz3qbfeFg6vBrGzcZoc8YN5i4Rkdv7tV30wAnY8vH2s+sif8Rm+CLUK2Ko6ppGas4y/z6VRqHrf0ZLdAc8Mcg6NtsQx0QX02HKy8qI6NkomrEg5cxezcYcvtCUe/oLg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQLHv2Ry8uXWR+tiaRUVug+11wmkCBinZQu7LPLVIjKbODYL713uVw7glKIQMP2CAd48z8htzd8GNANdTk0B1wP5FQXI1aAVaWzIWN5cY3Il2T1q1Pm4cWQYBvGnMsrBBA+vNDEz/48ZS8xFHlI86KxOvnDI29717P+dKkkYd7YPRhsuF+gkv6yVC/PLXKdTVjtCBwfPCeKwfmMhC8UAjTUBRkye+//KpJZr6hNXcJjCixpk1rv9hNo40l4d7BrDo8Wm/r+EzXRywlldVXmJLwl9tEG3lIaXbQU5E+PjpuOLHg0Dks4Z0fWMo/K/N/6ncJeyElaquXg4O44Bwc7nVQ==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Thu, 11 May 2023 11:26:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
>From map_dt_irq_to_domain() we are assigning a return code of
map_irq_to_domain() to a variable without checking it for an error.
Fix it by propagating the return code directly since this is the last
call.
Take the opportunity to use the correct printk() format specifiers,
since both irq and domain id are of unsigned types.
Fixes: 467e5cbb2ffc ("xen: arm: consolidate mmio and irq mapping to dom0")
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
xen/arch/arm/domain_build.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index f80fdd1af206..2c14718bff87 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -2303,7 +2303,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",
+ printk(XENLOG_ERR "%s: IRQ%u is not a SPI\n",
dt_node_name(dev), irq);
return -EINVAL;
}
@@ -2313,14 +2313,14 @@ static int __init map_dt_irq_to_domain(const struct
dt_device_node *dev,
if ( res )
{
printk(XENLOG_ERR
- "%s: Unable to setup IRQ%"PRId32" to dom%d\n",
+ "%s: Unable to setup IRQ%u to dom%u\n",
dt_node_name(dev), irq, d->domain_id);
return res;
}
res = map_irq_to_domain(d, irq, !mr_data->skip_mapping, dt_node_name(dev));
- return 0;
+ return res;
}
int __init map_range_to_domain(const struct dt_device_node *dev,
--
2.25.1
|