Skip to contentSkip to conversation

xen: Remove use of TRUE/FALSE

PATCH Superseded Kevin Stefanov 3 participants 5 messages Aug 10, 2021 – Aug 11, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover xen: Remove use of TRUE/FALSE

Kevin Stefanov (2):
xen/kexec: Remove use of TRUE/FALSE
x86/ioapic: Remove use of TRUE/FALSE

 xen/arch/x86/io_apic.c              | 12 ++++++------
 xen/common/kexec.c                  |  6 +++---
 xen/drivers/passthrough/vtd/utils.c |  2 +-
 xen/include/xen/kexec.h             |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 xen/kexec: Remove use of TRUE/FALSE

Whilst fixing this, also changed bool_t to bool.

---
CC: Andrew Cooper <[email protected]>

---
 xen/common/kexec.c      | 6 +++---
 xen/include/xen/kexec.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
xen/common/kexec.c +3 -3
index ebeee6405a..938cbb8005 100644
@@ -35,7 +35,7 @@
 #include <compat/kexec.h>
 #endif
 
-bool_t kexecing = FALSE;
+bool kexecing;
 
 /* Memory regions to store the per cpu register state etc. on a crash. */
 typedef struct { Elf_Note * start; size_t size; } crash_note_range_t;
@@ -383,7 +383,7 @@ void kexec_crash(enum crash_reason reason)
     if ( !test_bit(KEXEC_IMAGE_CRASH_BASE + pos, &kexec_flags) )
         return;
 
-    kexecing = TRUE;
+    kexecing = true;
 
     if ( kexec_common_shutdown() != 0 )
         return;
@@ -399,7 +399,7 @@ static long kexec_reboot(void *_image)
 {
     struct kexec_image *image = _image;
 
-    kexecing = TRUE;
+    kexecing = true;
 
     kexec_common_shutdown();
     machine_reboot_kexec(image);
xen/include/xen/kexec.h +1 -1
index 9f7a912e97..02dc889334 100644
@@ -17,7 +17,7 @@ typedef struct xen_kexec_reserve {
 extern xen_kexec_reserve_t kexec_crash_area;
 extern paddr_t kexec_crash_area_limit;
 
-extern bool_t kexecing;
+extern bool kexecing;
 
 void set_kexec_crash_area_size(u64 system_ram);
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] xen/kexec: Remove use of TRUE/FALSE

In reply to Kevin Stefanov

xen/common/kexec.c line 38

Quoted 8 lines · Kevin Stefanov
xen/common/kexec.c +1 -1
@@ -35,7 +35,7 @@
 #include <compat/kexec.h>
 #endif
 
-bool_t kexecing = FALSE;
+bool kexecing;

While not overly important for either of the two present readers, I nevertheless wonder whether at this occasion the variable couldn't also become __read_mostly. Andrew, thoughts?

xen/include/xen/kexec.h typedef struct xen_kexec_reserve { · line 20

Quoted 8 lines
xen/include/xen/kexec.h +1 -1
@@ -17,7 +17,7 @@ typedef struct xen_kexec_reserve {
 extern xen_kexec_reserve_t kexec_crash_area;
 extern paddr_t kexec_crash_area_limit;
 
-extern bool_t kexecing;
+extern bool kexecing;

Later in this file there's also a #define of this identifier, which imo then wants to also change from expanding to 0 to using "false".

With at least the latter adjustment (which personally I'd be fine carrying out while committing, just like I would be for the earlier suggestion, so long as you agree)

Jan

#4 lore raw

Re: [PATCH 1/2] xen/kexec: Remove use of TRUE/FALSE

Quoted 7 lines · Jan Beulich
Quoted 6 lines · Kevin Stefanov
xen/common/kexec.c +0 -0
@@ -35,7 +35,7 @@
 #include <compat/kexec.h>
 #endif
 
Quoted 5 lines

xen/common/kexec.c line 38

Quoted 2 lines
xen/common/kexec.c +1 -1
-bool_t kexecing = FALSE;
+bool kexecing;

While not overly important for either of the two present readers, I nevertheless wonder whether at this occasion the variable couldn't also become __read_mostly. Andrew, thoughts?

Yeah - forgot that.

Quoted 11 lines

xen/include/xen/kexec.h typedef struct xen_kexec_reserve { · line 20

Quoted 9 lines
xen/include/xen/kexec.h +1 -1
@@ -17,7 +17,7 @@ typedef struct xen_kexec_reserve {
 extern xen_kexec_reserve_t kexec_crash_area;
 extern paddr_t kexec_crash_area_limit;
 
-extern bool_t kexecing;
+extern bool kexecing;

Later in this file there's also a #define of this identifier, which imo then wants to also change from expanding to 0 to using "false".

Sounds good too.

~Andrew