x86/platform_hypercall.c: use plain bool
authorWei Liu <wei.liu2@citrix.com>
Wed, 28 Jun 2017 13:32:03 +0000 (14:32 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 29 Jun 2017 10:57:03 +0000 (11:57 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper@citrix.com>
xen/arch/x86/platform_hypercall.c

index 10e7bcc161e0b491d3b2e94d0c603384657e5e7e..ebc2f394ee33aaa983ed4d2592026065a15e08b4 100644 (file)
@@ -62,7 +62,7 @@ long cpu_frequency_change_helper(void *data)
     return cpu_frequency_change((uint64_t)data);
 }
 
-static bool_t allow_access_msr(unsigned int msr)
+static bool allow_access_msr(unsigned int msr)
 {
     switch ( msr )
     {
@@ -70,10 +70,10 @@ static bool_t allow_access_msr(unsigned int msr)
     case MSR_IA32_CMT_EVTSEL:
     case MSR_IA32_CMT_CTR:
     case MSR_IA32_TSC:
-        return 1;
+        return true;
     }
 
-    return 0;
+    return false;
 }
 
 void check_resource_access(struct resource_access *ra)
@@ -143,8 +143,8 @@ void resource_access(void *info)
                  * If next entry is MSR_IA32_TSC read, then the actual rdtsc
                  * is performed together with current entry, with IRQ disabled.
                  */
-                bool_t read_tsc = (i < ra->nr_done - 1 &&
-                                   unlikely(entry[1].idx == MSR_IA32_TSC));
+                bool read_tsc = i < ra->nr_done - 1 &&
+                                unlikely(entry[1].idx == MSR_IA32_TSC);
 
                 if ( unlikely(read_tsc) )
                     local_irq_save(flags);