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

[PATCH] xen/gen_hypercall: Fix if indent


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 2 Dec 2025 17:19:29 -0500
  • 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 (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=u9fyRm/qkLAdJRd4Zac3oiSGIvPacBykJHufEhTl5FY=; b=TifzNIaegVMnjOhDFipU9EBJXCn1TLV2tOr62jJc3KnfS/FhAs84zjpqVMlnBD/myf1EAg7pQEGQZLApxU0ziQ7NwAdlSTWyYvKexMXPKX9kr2UORweifouZPBqTlgJmG9FcWbBMT++tkL85pe4dejW1yneX9ivFmiGD6X7Gd1PyO9stnfih2dWDnBjYYrZ8rp4IzoYLZdF9qvTJZ/y/t7LG7waevuRlV5WmNRY7sW9G4VW1L2sscndqdGlTqaFANDdqi0Ib9/DnaLfrzBViRh79xHY9etMqa2+KYOMD6ZojaNQ9YsA6CwtbHXXv4iz4sS2YwVxGPvChTiFEl6KbFg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qfonmEbpUFH0KB8lchwHJ3edJppfdTZvEk0vrTdowt+LPhB5w6xuvAtBuw4TGkrRZ9FLbnVoAKwwojNqC8K/sw2rfFgS1KQn4aFjs/v+Xi1StncD0xeq6yj92Q1+7WU9sMKuyBG1XsL61ZLYa/Q13WNAzYkxIzXfNkOmm0YhdtDxJjyS3L3AK3EZQasjTpoLPx08P/idGZhUDpQgYMWyitemeeIdzQhvLbzKkG7/yi6FAbJ3fcy61+duu3PTTIyoZkTd8wg3Li5Bzcw3RGAdD4b+2wSJ5GGKDRKRqBOczw4rr98r252LJOnIprAf8InOfoaqPNCPKyvWenphPGOeEw==
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Tue, 02 Dec 2025 22:20:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On x86, the opening if of call_handlers_*() is indented 4 spaces which
breaks alignment.  The alignment is broken by printf("    "), but
that actually aligns ARM's opening "if ( likely() )".  Move the indent
to the if that needs it.

This results in x86 hypercall-defs.h changes like:

 #define call_handlers_hvm64(num, ret, a1, a2, a3, a4, a5) \
 ({ \
     uint64_t mask = (num) > 63 ? 0 : 1ULL << (num); \
-        if ( likely(mask & ((1ULL << __HYPERVISOR_vcpu_op) | (1ULL << 
__HYPERVISOR_event_channel_op))) ) \
+    if ( likely(mask & ((1ULL << __HYPERVISOR_vcpu_op) | (1ULL << 
__HYPERVISOR_event_channel_op))) ) \
     { \
         if ( (num) == __HYPERVISOR_vcpu_op ) \

ARM's hypercall-defs.h does not change.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
 xen/scripts/gen_hypercall.awk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/scripts/gen_hypercall.awk b/xen/scripts/gen_hypercall.awk
index 47a18cd75e..b544fe1c4d 100644
--- a/xen/scripts/gen_hypercall.awk
+++ b/xen/scripts/gen_hypercall.awk
@@ -266,7 +266,7 @@ END {
         printf("({ \\\n");
         if (need_mask)
             printf("    uint64_t mask = (num) > 63 ? 0 : 1ULL << (num); \\\n");
-        printf("    ");
+
         for (pl = 1; pl <= n_prios[ca]; pl++) {
             if (prios[ca, p_list[pl]] > 1) {
                 if (pl < n_prios[ca]) {
@@ -292,7 +292,7 @@ END {
             } else {
                 for (i = 1; i <= nc; i++)
                     if (call[i] == ca && call_prio[i] == p_list[pl]) {
-                        printf("if ( likely((num) == __HYPERVISOR_%s) ) \\\n", 
fn[call_fn[i]]);
+                        printf("    if ( likely((num) == __HYPERVISOR_%s) ) 
\\\n", fn[call_fn[i]]);
                         do_call(call_fn[i], call_p[i]);
                     }
             }
-- 
2.51.1




 


Rackspace

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