diff mbox

[2/8] x86/platform_hypercall.c: use plain bool

Message ID 20170628141827.19046-3-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu June 28, 2017, 2:18 p.m. UTC
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 xen/arch/x86/platform_hypercall.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Andrew Cooper June 28, 2017, 2:21 p.m. UTC | #1
On 28/06/17 15:18, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper@citrix.com>
diff mbox

Patch

diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c
index 10e7bcc161..ebc2f394ee 100644
--- a/xen/arch/x86/platform_hypercall.c
+++ b/xen/arch/x86/platform_hypercall.c
@@ -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);