[PATCH] x86/alternative: Clean up headers

Andrew Cooper posted 1 patch 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250422113307.1285890-1-andrew.cooper3@citrix.com
xen/arch/x86/include/asm/alternative.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
[PATCH] x86/alternative: Clean up headers
Posted by Andrew Cooper 8 months ago
alternative.h doesn't need lib.h now that macros.h exists.  Futhermore, STR()
is already the prevailing style, so convert the final __stringify() to drop
stringify.h too.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/include/asm/alternative.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h
index 38472fb58e2d..7326ad942836 100644
--- a/xen/arch/x86/include/asm/alternative.h
+++ b/xen/arch/x86/include/asm/alternative.h
@@ -4,8 +4,10 @@
 #ifdef __ASSEMBLY__
 #include <asm/alternative-asm.h>
 #else
-#include <xen/lib.h>
-#include <xen/stringify.h>
+
+#include <xen/macros.h>
+#include <xen/types.h>
+
 #include <asm/asm-macros.h>
 #include <asm/cpufeatureset.h>
 
@@ -65,7 +67,7 @@ extern void alternative_branches(void);
         " .endif\n"                                                     \
         " .long .LXEN%=_orig_s - .\n"             /* label           */ \
         " .long " alt_repl_s(num)" - .\n"         /* new instruction */ \
-        " .word " __stringify(feature) "\n"       /* feature bit     */ \
+        " .word " STR(feature) "\n"               /* feature bit     */ \
         " .byte " alt_orig_len "\n"               /* source len      */ \
         " .byte " alt_repl_len(num) "\n"          /* replacement len */ \
         " .byte " alt_pad_len "\n"                /* padding len     */ \
-- 
2.39.5


Re: [PATCH] x86/alternative: Clean up headers
Posted by Jan Beulich 8 months ago
On 22.04.2025 13:33, Andrew Cooper wrote:
> alternative.h doesn't need lib.h now that macros.h exists.  Futhermore, STR()
> is already the prevailing style, so convert the final __stringify() to drop
> stringify.h too.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>