]> xenbits.xensource.com Git - xen.git/commitdiff
x86/xstate: address a violation of MISRA C:2012 Rule 8.3
authorFederico Serafini <federico.serafini@bugseng.com>
Wed, 15 Nov 2023 10:40:58 +0000 (11:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 15 Nov 2023 10:40:58 +0000 (11:40 +0100)
Make function declaration and definition consistent.
No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/xstate.c

index f442610fc54e3b6c8e6cade497642cd12ca5b09d..cf94761d054281bd277e1f163f1bf0009619c7d2 100644 (file)
@@ -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;