diff mbox series

[RFC,4/5] x86/HVM: protect mm_type_tbl format from clang-format

Message ID 20230728081144.4124309-5-luca.fancellu@arm.com (mailing list archive)
State Superseded
Headers show
Series clang-format for Xen | expand

Commit Message

Luca Fancellu July 28, 2023, 8:11 a.m. UTC
The array mm_type_tbl initialization is formatted in a way that
clang-format can't keep, so disable clang-format on that array
initialization.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
 xen/arch/x86/hvm/mtrr.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 29f3fb160776..f32ce3162ae2 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -18,6 +18,7 @@ 
 /* Get page attribute fields (PAn) from PAT MSR. */
 #define pat_cr_2_paf(pat_cr,n)  ((((uint64_t)pat_cr) >> ((n)<<3)) & 0xff)
 
+/* clang-format off */
 /* Effective mm type lookup table, according to MTRR and PAT. */
 static const uint8_t mm_type_tbl[MTRR_NUM_TYPES][X86_NUM_MT] = {
 #define RS MEMORY_NUM_TYPES
@@ -43,6 +44,7 @@  static const uint8_t mm_type_tbl[MTRR_NUM_TYPES][X86_NUM_MT] = {
 #undef WB
 #undef RS
 };
+/* clang-format on */
 
 /*
  * Reverse lookup table, to find a pat type according to MTRR and effective