[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 2/2] xen/arm: domain_build: Fix format specifiers in map_{dt_}irq_to_domain()


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 11 May 2023 15:02:18 +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=QFV3Thk556fIvO/E1qIqL45bP3uNbQnb7E7Joekqvfg=; b=Hu6q5z5DVrWtFAcQ+1I4MriYell5NNsFq7YMK9PImtPxKu89y5qyGkasWtjlmSSIRSortYRtng0ra8tEVyskoVdDeA2HW1aAUTLkjWZVHk3XTOCy7tv6eAsCqO0FQRoHXzJcb05uciJBAJsg9KgAdZJGitToo+sd2p5aEPag6pNl/9jfiCjJ62TrSq+kXo8HyBu9hvXLqc0QH7aGa0vDyjIGvW9Jsndfy36an7js8/NdG95Gu7FXmPUKgwhCoFS7P9A6OPkbWV3/gpPa9VYe4gOVNIhporNOm3g8rIl+QavDD3UNAL0KgR91xSPuLUhOyfZtwp1/eNKP6vdaJTcUgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m5FtknzW03Kqa87K3qF+TS8sv/koEI1cHw7wfCwRVZ+NUFZuh+yzxa5M3sxp7LyPmypTixxh04VPFpbk6S+8UqoWEbca3dwk/u5ZTaXqTWcf7DJ03waUfh2nOQcLUjeC/BpMPQUyB3bli64KStOYoQA+OTU9VM3b094r0elCiZ+rsns5lpwBcNE9M1+I4xo/M5eIzeC8QyJwmPmTYNqYk+CucVFUuFGC4yBBZacPhFzZH8f5fQYJrhJbPU/8d241QN9Q6uMMOV7q5zgzgWj7A67DQu04wI6HnCkr7vEWkR1YXJudJcSnRYpfYVyPdAvLHM6m2Q7dXj67IW1q6+E5sA==
  • 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 13:02:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 splitted lines for printk().

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
Changes in v2:
 - split the v1 patch so that the format specifiers are handled separately
 - also fix map_irq_to_domain()
---
 xen/arch/arm/domain_build.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 9dee1bb8f21c..71f307a572e9 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;
     }
 
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.