[XEN PATCH 1/5] x86: swap parameter names of hvm_copy_context_and_params() declaration

Federico Serafini posted 5 patches 2 years, 7 months ago
[XEN PATCH 1/5] x86: swap parameter names of hvm_copy_context_and_params() declaration
Posted by Federico Serafini 2 years, 7 months ago
Swap parameter names 'src' and 'dst' of hvm_copy_context_and_params()
declaration for consistency with the corresponding definition and the
uses of such function.
Also, this fixes a violation of MISRA C:2012 Rule 8.3.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/arch/x86/include/asm/hvm/hvm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h
index 04cbd4ff24..9555b4c41f 100644
--- a/xen/arch/x86/include/asm/hvm/hvm.h
+++ b/xen/arch/x86/include/asm/hvm/hvm.h
@@ -366,7 +366,7 @@ const char *hvm_efer_valid(const struct vcpu *v, uint64_t value,
                            signed int cr0_pg);
 unsigned long hvm_cr4_guest_valid_bits(const struct domain *d);
 
-int hvm_copy_context_and_params(struct domain *src, struct domain *dst);
+int hvm_copy_context_and_params(struct domain *dst, struct domain *src);
 
 int hvm_get_param(struct domain *d, uint32_t index, uint64_t *value);
 
-- 
2.34.1
Re: [XEN PATCH 1/5] x86: swap parameter names of hvm_copy_context_and_params() declaration
Posted by Stefano Stabellini 2 years, 7 months ago
On Thu, 29 Jun 2023, Federico Serafini wrote:
> Swap parameter names 'src' and 'dst' of hvm_copy_context_and_params()
> declaration for consistency with the corresponding definition and the
> uses of such function.
> Also, this fixes a violation of MISRA C:2012 Rule 8.3.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

better to change the title of the patch to:
x86/hvm: swap parameter names of hvm_copy_context_and_params() declaration

It could be done on commit.


Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  xen/arch/x86/include/asm/hvm/hvm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h
> index 04cbd4ff24..9555b4c41f 100644
> --- a/xen/arch/x86/include/asm/hvm/hvm.h
> +++ b/xen/arch/x86/include/asm/hvm/hvm.h
> @@ -366,7 +366,7 @@ const char *hvm_efer_valid(const struct vcpu *v, uint64_t value,
>                             signed int cr0_pg);
>  unsigned long hvm_cr4_guest_valid_bits(const struct domain *d);
>  
> -int hvm_copy_context_and_params(struct domain *src, struct domain *dst);
> +int hvm_copy_context_and_params(struct domain *dst, struct domain *src);
>  
>  int hvm_get_param(struct domain *d, uint32_t index, uint64_t *value);
>  
> -- 
> 2.34.1
>