* [XEN PATCH 1/4] video/vesa: drop bool_t
2023-09-29 8:56 [XEN PATCH 0/4] Address violations of MISRA C:2012 Rule 8.3 Federico Serafini
@ 2023-09-29 8:56 ` Federico Serafini
2023-09-29 10:30 ` Federico Serafini
2023-09-29 8:56 ` [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3 Federico Serafini
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Federico Serafini @ 2023-09-29 8:56 UTC (permalink / raw)
To: xen-devel
Cc: consulting, Federico Serafini, Andrew Cooper, George Dunlap,
Jan Beulich, Julien Grall, Stefano Stabellini, Wei Liu,
Henry Wang
Drop bool_t to 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 <federico.serafini@bugseng.com>
---
xen/drivers/video/vesa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/drivers/video/vesa.c b/xen/drivers/video/vesa.c
index b007ff5678..70feca21ac 100644
--- a/xen/drivers/video/vesa.c
+++ b/xen/drivers/video/vesa.c
@@ -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 )
{
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [XEN PATCH 1/4] video/vesa: drop bool_t
2023-09-29 8:56 ` [XEN PATCH 1/4] video/vesa: drop bool_t Federico Serafini
@ 2023-09-29 10:30 ` Federico Serafini
0 siblings, 0 replies; 12+ messages in thread
From: Federico Serafini @ 2023-09-29 10:30 UTC (permalink / raw)
To: xen-devel
Cc: consulting, Andrew Cooper, George Dunlap, Jan Beulich,
Julien Grall, Stefano Stabellini, Wei Liu, Henry Wang
On 29/09/23 10:56, Federico Serafini wrote:
> Drop bool_t to 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 <federico.serafini@bugseng.com>
> ---
> xen/drivers/video/vesa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/drivers/video/vesa.c b/xen/drivers/video/vesa.c
> index b007ff5678..70feca21ac 100644
> --- a/xen/drivers/video/vesa.c
> +++ b/xen/drivers/video/vesa.c
> @@ -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.
--
Federico Serafini, M.Sc.
Software Engineer, BUGSENG (http://bugseng.com)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3
2023-09-29 8:56 [XEN PATCH 0/4] Address violations of MISRA C:2012 Rule 8.3 Federico Serafini
2023-09-29 8:56 ` [XEN PATCH 1/4] video/vesa: drop bool_t Federico Serafini
@ 2023-09-29 8:56 ` Federico Serafini
2023-09-29 20:53 ` Stefano Stabellini
2023-09-29 8:56 ` [XEN PATCH 3/4] x86/xstate: address a violation " Federico Serafini
2023-09-29 8:56 ` [XEN PATCH 4/4] x86/psr: " Federico Serafini
3 siblings, 1 reply; 12+ messages in thread
From: Federico Serafini @ 2023-09-29 8:56 UTC (permalink / raw)
To: xen-devel
Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
Roger Pau Monné, Wei Liu, Henry Wang
Make function declarations and definitions consistent.
No functional change.
Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
xen/arch/x86/include/asm/uaccess.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/include/asm/uaccess.h b/xen/arch/x86/include/asm/uaccess.h
index 684fccd95c..7443519d5b 100644
--- a/xen/arch/x86/include/asm/uaccess.h
+++ b/xen/arch/x86/include/asm/uaccess.h
@@ -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);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3
2023-09-29 8:56 ` [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3 Federico Serafini
@ 2023-09-29 20:53 ` Stefano Stabellini
2023-10-16 15:05 ` Jan Beulich
0 siblings, 1 reply; 12+ messages in thread
From: Stefano Stabellini @ 2023-09-29 20:53 UTC (permalink / raw)
To: Federico Serafini
Cc: xen-devel, consulting, Jan Beulich, Andrew Cooper,
Roger Pau Monné, Wei Liu, Henry Wang
On Fri, 29 Sep 2023, Federico Serafini wrote:
> Make function declarations and definitions consistent.
> No functional change.
>
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3
2023-09-29 20:53 ` Stefano Stabellini
@ 2023-10-16 15:05 ` Jan Beulich
0 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2023-10-16 15:05 UTC (permalink / raw)
To: Federico Serafini
Cc: xen-devel, consulting, Andrew Cooper, Roger Pau Monné,
Wei Liu, Henry Wang, Stefano Stabellini
On 29.09.2023 22:53, Stefano Stabellini wrote:
> On Fri, 29 Sep 2023, Federico Serafini wrote:
>> Make function declarations and definitions 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>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3
2023-09-29 8:56 [XEN PATCH 0/4] Address violations of MISRA C:2012 Rule 8.3 Federico Serafini
2023-09-29 8:56 ` [XEN PATCH 1/4] video/vesa: drop bool_t Federico Serafini
2023-09-29 8:56 ` [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3 Federico Serafini
@ 2023-09-29 8:56 ` Federico Serafini
2023-09-29 20:53 ` Stefano Stabellini
2023-09-29 8:56 ` [XEN PATCH 4/4] x86/psr: " Federico Serafini
3 siblings, 1 reply; 12+ messages in thread
From: Federico Serafini @ 2023-09-29 8:56 UTC (permalink / raw)
To: xen-devel
Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
Roger Pau Monné, Wei Liu, Henry Wang
Make function declaration and definition consistent.
No functional change.
Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3
2023-09-29 8:56 ` [XEN PATCH 3/4] x86/xstate: address a violation " Federico Serafini
@ 2023-09-29 20:53 ` Stefano Stabellini
2023-10-16 15:06 ` Jan Beulich
0 siblings, 1 reply; 12+ messages in thread
From: Stefano Stabellini @ 2023-09-29 20:53 UTC (permalink / raw)
To: Federico Serafini
Cc: xen-devel, consulting, Jan Beulich, Andrew Cooper,
Roger Pau Monné, Wei Liu, Henry Wang
On Fri, 29 Sep 2023, Federico Serafini wrote:
> 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>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3
2023-09-29 20:53 ` Stefano Stabellini
@ 2023-10-16 15:06 ` Jan Beulich
0 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2023-10-16 15:06 UTC (permalink / raw)
To: Federico Serafini
Cc: xen-devel, consulting, Andrew Cooper, Roger Pau Monné,
Wei Liu, Henry Wang, Stefano Stabellini
On 29.09.2023 22:53, Stefano Stabellini wrote:
> On Fri, 29 Sep 2023, Federico Serafini wrote:
>> 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>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [XEN PATCH 4/4] x86/psr: address a violation of MISRA C:2012 Rule 8.3
2023-09-29 8:56 [XEN PATCH 0/4] Address violations of MISRA C:2012 Rule 8.3 Federico Serafini
` (2 preceding siblings ...)
2023-09-29 8:56 ` [XEN PATCH 3/4] x86/xstate: address a violation " Federico Serafini
@ 2023-09-29 8:56 ` Federico Serafini
2023-09-29 20:54 ` Stefano Stabellini
3 siblings, 1 reply; 12+ messages in thread
From: Federico Serafini @ 2023-09-29 8:56 UTC (permalink / raw)
To: xen-devel
Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
Roger Pau Monné, Wei Liu, Henry Wang
Make function declaration and definition consistent.
No functional change.
Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
xen/arch/x86/include/asm/psr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/include/asm/psr.h b/xen/arch/x86/include/asm/psr.h
index c2257da7fc..8ecb7a0eea 100644
--- a/xen/arch/x86/include/asm/psr.h
+++ b/xen/arch/x86/include/asm/psr.h
@@ -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);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [XEN PATCH 4/4] x86/psr: address a violation of MISRA C:2012 Rule 8.3
2023-09-29 8:56 ` [XEN PATCH 4/4] x86/psr: " Federico Serafini
@ 2023-09-29 20:54 ` Stefano Stabellini
2023-10-16 15:06 ` Jan Beulich
0 siblings, 1 reply; 12+ messages in thread
From: Stefano Stabellini @ 2023-09-29 20:54 UTC (permalink / raw)
To: Federico Serafini
Cc: xen-devel, consulting, Jan Beulich, Andrew Cooper,
Roger Pau Monné, Wei Liu, Henry Wang
On Fri, 29 Sep 2023, Federico Serafini wrote:
> 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>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [XEN PATCH 4/4] x86/psr: address a violation of MISRA C:2012 Rule 8.3
2023-09-29 20:54 ` Stefano Stabellini
@ 2023-10-16 15:06 ` Jan Beulich
0 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2023-10-16 15:06 UTC (permalink / raw)
To: Federico Serafini
Cc: xen-devel, consulting, Andrew Cooper, Roger Pau Monné,
Wei Liu, Henry Wang, Stefano Stabellini
On 29.09.2023 22:54, Stefano Stabellini wrote:
> On Fri, 29 Sep 2023, Federico Serafini wrote:
>> 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>
^ permalink raw reply [flat|nested] 12+ messages in thread