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

[xen master] xen/gen_hypercall: Fix if indent



commit cc7095a82d62656200cdc87689a85ad6cd53afa2
Author:     Jason Andryuk <jason.andryuk@xxxxxxx>
AuthorDate: Mon Dec 8 15:31:19 2025 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Dec 8 15:51:41 2025 +0100

    xen/gen_hypercall: Fix if indent
    
    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>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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]);
                     }
             }
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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