Skip to contentSkip to conversation

x86/boot: Reduce verbosity in reloc_trampoline??()

PATCH In review Andrew Cooper 2 participants 2 messages Nov 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/boot: Reduce verbosity in reloc_trampoline??()

The name 'trampoline_ptr' is voluminous without merit.

Shorten it to just ptr. No functional change.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>

---
 xen/arch/x86/boot/reloc-trampoline.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
xen/arch/x86/boot/reloc-trampoline.c +5 -9
index e35e7c78aa86..f52b9b265b42 100644
@@ -18,7 +18,7 @@ void reloc_trampoline64(void)
 #endif
 {
     uint32_t phys = trampoline_phys;
-    const int32_t *trampoline_ptr;
+    const int32_t *ptr;
 
     /*
      * Apply relocations to trampoline.
@@ -26,13 +26,9 @@ void reloc_trampoline64(void)
      * This modifies the trampoline in place within Xen, so that it will
      * operate correctly when copied into place.
      */
-    for ( trampoline_ptr = __trampoline_rel_start;
-          trampoline_ptr < __trampoline_rel_stop;
-          ++trampoline_ptr )
-        *(uint32_t *)(*trampoline_ptr + (long)trampoline_ptr) += phys;
+    for ( ptr = __trampoline_rel_start; ptr < __trampoline_rel_stop; ++ptr )
+        *(uint32_t *)(*ptr + (long)ptr) += phys;
 
-    for ( trampoline_ptr = __trampoline_seg_start;
-          trampoline_ptr < __trampoline_seg_stop;
-          ++trampoline_ptr )
-        *(uint16_t *)(*trampoline_ptr + (long)trampoline_ptr) = phys >> 4;
+    for ( ptr = __trampoline_seg_start; ptr < __trampoline_seg_stop; ++ptr )
+        *(uint16_t *)(*ptr + (long)ptr) = phys >> 4;
 }

base-commit: 97bf370375113caf92fccf04e2877fc6b5ff887f

Signature · 1 line
2.39.5