Skip to contentSkip to conversation

x86/mm: undo type change of partial_flags

PATCH In review Jan Beulich 4 participants 4 messages Sep 12, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mm: undo type change of partial_flags

Clang dislikes the boolean type combined with the field being set using PTF_partial_set.

Fixes 5ffe6d4a02e0 ("types: replace remaining uses of s16")
xen/arch/x86/include/asm/mm.h +1 -1
@@ -286,7 +286,7 @@ struct page_info
         struct {
             u16 nr_validated_ptes:PAGETABLE_ORDER + 1;
             u16 :16 - PAGETABLE_ORDER - 1 - 1;
-            bool partial_flags:1;
+            uint16_t partial_flags:1;
             int16_t linear_pt_count;
         };
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jan Beulich

Clang dislikes the boolean type combined with the field being set using PTF_partial_set.

Fixes 5ffe6d4a02e0 ("types: replace remaining uses of s16")

xen/arch/x86/include/asm/mm.h struct page_info · line 292

Quoted 8 lines
xen/arch/x86/include/asm/mm.h +1 -1
@@ -286,7 +286,7 @@ struct page_info
         struct {
             u16 nr_validated_ptes:PAGETABLE_ORDER + 1;
             u16 :16 - PAGETABLE_ORDER - 1 - 1;
-            bool partial_flags:1;
+            uint16_t partial_flags:1;
             int16_t linear_pt_count;
         };
 

I knew MS compiler does not like too, but I only tested with GCC, and it was fine with it

Frediano