Address violations of MISRA C:2012 Rule 8.3
PATCH 4/4 x86/psr: address a violation of MISRA C:2012 Rule 8.3
In reply to Federico SerafiniMake function declaration and definition consistent. No functional change.
--- xen/arch/x86/include/asm/psr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/include/asm/psr.h +1 -1
@@ -81,7 +81,7 @@ int psr_get_info(unsigned int socket, enum psr_type type,int psr_get_val (struct domain *d,unsigned int socket,uint32_t *val,enum psr_type type);int psr_set_val (struct domain *d,unsigned int socket, -uint64_t val,enum psr_type type); +uint64_t new_val,enum psr_type type);void psr_domain_init (struct domain *d);void psr_domain_free (struct domain *d);
Signature · 1 line
2.34.1
PATCH 1/4 video/vesa: drop bool_t
In reply to Federico SerafiniDrop bool_t to make function declaration and definition consistent and address a violation of MISRA C:2012 Rule 8.3.
No functional change.
--- xen/drivers/video/vesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/video/vesa.c +1 -1
@@ -145,7 +145,7 @@ static void cf_check lfb_flush(void) __asm__ __volatile__ ("sfence" : : :"memory" ); } -void __init vesa_endboot (bool_t keep) +void __init vesa_endboot (bool keep) {if ( keep ) {
Signature · 1 line
2.34.1
PATCH 2/4 x86/uaccess: address violations of MISRA C:2012 Rule 8.3
In reply to Federico SerafiniMake function declarations and definitions consistent. No functional change.
--- xen/arch/x86/include/asm/uaccess.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/arch/x86/include/asm/uaccess.h +3 -3
@@ -10,10 +10,10 @@#include <asm/x86_64/uaccess.h> unsigned int copy_to_guest_pv (void __user *to,const void *from, -unsigned int len); -unsigned int clear_guest_pv (void __user *to,unsigned int len); +unsigned int n); +unsigned int clear_guest_pv (void __user *to,unsigned int n);unsigned int copy_from_guest_pv (void *to,const void __user *from, -unsigned int len); +unsigned int n);/* Handles exceptions in both to and from, but doesn't do access_ok */ unsigned int copy_to_guest_ll (void __user *to,const void *from,unsigned int n);
Signature · 1 line
2.34.1
PATCH 3/4 x86/xstate: address a violation of MISRA C:2012 Rule 8.3
In reply to Federico SerafiniMake function declaration and definition consistent. No functional change.
--- xen/arch/x86/xstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
xen/arch/x86/xstate.c +4 -4
@@ -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;
Signature · 1 line
2.34.1
cover Address violations of MISRA C:2012 Rule 8.3
This series contains small and uncontroversial patches to address some violations of Rule 8.3.
No functonal changes are introduced.
Federico Serafini (4):
video/vesa: drop bool_t
x86/uaccess: address violations of MISRA C:2012 Rule 8.3 x86/xstate: address a violation of MISRA C:2012 Rule 8.3 x86/psr: address a violation of MISRA C:2012 Rule 8.3
xen/arch/x86/include/asm/psr.h | 2 +- xen/arch/x86/include/asm/uaccess.h | 6 +++--- xen/arch/x86/xstate.c | 8 ++++---- xen/drivers/video/vesa.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.34.1
Re: [XEN PATCH 1/4] video/vesa: drop bool_t
In reply to Federico SerafiniQuoted 14 lines · Federico Serafini
Drop
bool_tto make function declaration and definition consistent and address a violation of MISRA C:2012 Rule 8.3.
No functional change.Signed-off-by Federico Serafini <[email protected]>--- xen/drivers/video/vesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/drivers/video/vesa.c +0
-0
xen/drivers/video/vesa.c static void cf_check lfb_flush(void) · line 151
Quoted 8 lines
xen/drivers/video/vesa.c +1
-1@@ -145,7 +145,7 @@ static void cf_check lfb_flush(void) __asm__ __volatile__ ("sfence" : : :"memory" ); } -void __init vesa_endboot (bool_t keep) +void __init vesa_endboot (bool keep) {if ( keep ) {
I am seeing that there is an acked patch that solves this, so this patch should be dropped.
Signature · 3 lines
Federico Serafini, M.Sc. Software Engineer, BUGSENG (http://bugseng.com)
Re: [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3
In reply to Federico SerafiniQuoted 4 lines · Federico Serafini
Make function declarations and definitions consistent. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3
In reply to Federico SerafiniQuoted 4 lines · Federico Serafini
Make function declaration and definition consistent. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 4/4] x86/psr: address a violation of MISRA C:2012 Rule 8.3
In reply to Federico SerafiniQuoted 4 lines · Federico Serafini
Make function declaration and definition consistent. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Jan Beulich
Acked-byRe: [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3
In reply to Stefano StabelliniQuoted 7 lines · Stefano Stabellini
Quoted 4 lines · Federico Serafini
Make function declarations and definitions consistent. No functional change.
Signed-off-by Federico Serafini <[email protected]>Reviewed-by Stefano Stabellini <[email protected]>
Jan Beulich
Acked-byRe: [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3
In reply to Stefano StabelliniQuoted 7 lines · Stefano Stabellini
Quoted 4 lines · Federico Serafini
Make function declaration and definition consistent. No functional change.
Signed-off-by Federico Serafini <[email protected]>Reviewed-by Stefano Stabellini <[email protected]>
Jan Beulich
Acked-byRe: [XEN PATCH 4/4] x86/psr: address a violation of MISRA C:2012 Rule 8.3
In reply to Stefano StabelliniQuoted 7 lines · Stefano Stabellini
Quoted 4 lines · Federico Serafini
Make function declaration and definition consistent. No functional change.
Signed-off-by Federico Serafini <[email protected]>Reviewed-by Stefano Stabellini <[email protected]>