[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/xstate: address a violation of MISRA C:2012 Rule 8.3



commit fde774154cf2c4e648043524f4c40b5ee2b97338
Author:     Federico Serafini <federico.serafini@xxxxxxxxxxx>
AuthorDate: Wed Nov 15 11:40:58 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Nov 15 11:40:58 2023 +0100

    x86/xstate: address a violation of MISRA C:2012 Rule 8.3
    
    Make function declaration and definition consistent.
    No functional change.
    
    Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/xstate.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/xstate.c b/xen/arch/x86/xstate.c
index f442610fc5..cf94761d05 100644
--- a/xen/arch/x86/xstate.c
+++ b/xen/arch/x86/xstate.c
@@ -54,16 +54,16 @@ static inline bool xsetbv(u32 index, u64 xfeatures)
     return lo != 0;
 }
 
-bool set_xcr0(u64 val)
+bool set_xcr0(u64 xfeatures)
 {
     uint64_t *this_xcr0 = &this_cpu(xcr0);
 
-    if ( *this_xcr0 != val )
+    if ( *this_xcr0 != xfeatures )
     {
-        if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, val) )
+        if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures) )
             return false;
 
-        *this_xcr0 = val;
+        *this_xcr0 = xfeatures;
     }
 
     return true;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.