x86: address some violations of MISRA C:2012 Rule 8.2
cover x86: address some violations of MISRA C:2012 Rule 8.2
This patch series addresses some of the violations of Rule 8.2 adding the missing parameter names.
Federico Serafini (8):
x86/hvm: address violations of MISRA C:2012 Rule 8.2 x86/mmconfig: address violations of MISRA C:2012 Rule 8.2 x86/vpmu: address a violation of MISRA C:2012 Rule 8.2 x86/smp: address a violation of MISRA C:2012 Rule 8.2 x86/pci: address a violation of MISRA C:2012 Rule 8.2 x86/physdev: address violations of MISRA C:2012 Rule 8.2 x86/platform_hypercall: address violations of MISRA C:2012 Rule 8.2 x86/sysctl: address a violation of MISRA C:2012 Rule 8.2
xen/arch/x86/include/asm/pci.h | 2 +- xen/arch/x86/include/asm/smp.h | 2 +- xen/arch/x86/include/asm/vpmu.h | 2 +- xen/arch/x86/physdev.c | 6 +++--- xen/arch/x86/platform_hypercall.c | 6 +++--- xen/arch/x86/sysctl.c | 2 +- xen/arch/x86/x86_64/mmconfig.h | 4 ++-- xen/drivers/passthrough/x86/hvm.c | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/8 x86/hvm: address violations of MISRA C:2012 Rule 8.2
Add missing parameter names. No functional change.
--- xen/drivers/passthrough/x86/hvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/drivers/passthrough/x86/hvm.c +2 -2
@@ -724,8 +724,8 @@ bool pt_pirq_cleanup_check(struct hvm_pirq_dpci *dpci) }int pt_pirq_iterate (struct domain *d, -int (*cb)(struct domain *, -struct hvm_pirq_dpci *,void *), +int (*cb)(struct domain *d, +struct hvm_pirq_dpci *pirq_dpci,void *arg),void *arg) {int rc =0 ;
Signature · 1 line
2.34.1
Re: [XEN PATCH 1/8] x86/hvm: address violations of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
PATCH 2/8 x86/mmconfig: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/arch/x86/x86_64/mmconfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/x86_64/mmconfig.h +2 -2
@@ -70,5 +70,5 @@ int pci_mmcfg_reserved(uint64_t address, unsigned int segment, unsigned int start_bus, unsigned int end_bus, unsigned int flags);int pci_mmcfg_arch_init (void ); -int pci_mmcfg_arch_enable (unsigned int ); -void pci_mmcfg_arch_disable (unsigned int ); +int pci_mmcfg_arch_enable (unsigned int idx); +void pci_mmcfg_arch_disable (unsigned int idx);
Signature · 1 line
2.34.1
Re: [XEN PATCH 2/8] x86/mmconfig: address violations of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
PATCH 3/8 x86/vpmu: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
--- xen/arch/x86/include/asm/vpmu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/include/asm/vpmu.h +1 -1
@@ -35,7 +35,7 @@ struct arch_vpmu_ops {void (*arch_vpmu_destroy)(struct vcpu *v);int (*arch_vpmu_save)(struct vcpu *v,bool_t to_guest);int (*arch_vpmu_load)(struct vcpu *v,bool_t from_guest); -void (*arch_vpmu_dump)(const struct vcpu *); +void (*arch_vpmu_dump)(const struct vcpu *v);#ifdef CONFIG_MEM_SHARING int (*allocate_context)(struct vcpu *v);
Signature · 1 line
2.34.1
Re: [XEN PATCH 3/8] x86/vpmu: address a violation of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
PATCH 4/8 x86/smp: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
--- xen/arch/x86/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/include/asm/smp.h +1 -1
@@ -32,7 +32,7 @@ extern bool park_offline_cpus;void smp_send_nmi_allbutself (void ); -void send_IPI_mask (const cpumask_t *,int vector); +void send_IPI_mask (const cpumask_t *mask,int vector);void send_IPI_self (int vector);extern void (*mtrr_hook) (void );
Signature · 1 line
2.34.1
Re: [XEN PATCH 4/8] x86/smp: address a violation of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
PATCH 5/8 x86/pci: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
--- xen/arch/x86/include/asm/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/include/asm/pci.h +1 -1
@@ -37,7 +37,7 @@ struct arch_pci_dev {int pci_conf_write_intercept (unsigned int seg,unsigned int bdf,unsigned int reg,unsigned int size,uint32_t *data); -int pci_msi_conf_write_intercept (struct pci_dev *,unsigned int reg, +int pci_msi_conf_write_intercept (struct pci_dev *pdev,unsigned int reg,unsigned int size,uint32_t *data);bool_t pci_mmcfg_decode (unsigned long mfn,unsigned int *seg,unsigned int *bdf);
Signature · 1 line
2.34.1
Re: [XEN PATCH 5/8] x86/pci: address a violation of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
PATCH 6/8 x86/physdev: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/arch/x86/physdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/arch/x86/physdev.c +3 -3
@@ -18,9 +18,9 @@#include <xsm/xsm.h> #include <asm/p2m.h> -int physdev_map_pirq (domid_t ,int type,int *index,int *pirq_p, -struct msi_info *); -int physdev_unmap_pirq (domid_t ,int pirq); +int physdev_map_pirq (domid_t domid,int type,int *index,int *pirq_p, +struct msi_info *msi); +int physdev_unmap_pirq (domid_t domid,int pirq);#include "x86_64/mmconfig.h"
Signature · 1 line
2.34.1
Re: [XEN PATCH 6/8] x86/physdev: address violations of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Albeit I can't resist to say that ...
xen/arch/x86/physdev.c line 23
Quoted 12 lines
xen/arch/x86/physdev.c +3
-3@@ -18,9 +18,9 @@#include <xsm/xsm.h> #include <asm/p2m.h> -int physdev_map_pirq (domid_t ,int type,int *index,int *pirq_p, -struct msi_info *); -int physdev_unmap_pirq (domid_t ,int pirq); +int physdev_map_pirq (domid_t domid,int type,int *index,int *pirq_p, +struct msi_info *msi); +int physdev_unmap_pirq (domid_t domid,int pirq);
... this is a good example where adding names to the so far unnamed parameters adds no new useful information at all, as their types were already sufficient to express all that needs expressing here.
Jan
PATCH 7/8 x86/platform_hypercall: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/arch/x86/platform_hypercall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/arch/x86/platform_hypercall.c +3 -3
@@ -46,9 +46,9 @@ struct resource_access {xenpf_resource_entry_t *entries; }; -long cf_check cpu_frequency_change_helper (void *); -void check_resource_access (struct resource_access *); -void cf_check resource_access(void *); +long cf_check cpu_frequency_change_helper (void *data); +void check_resource_access (struct resource_access *ra); +void cf_check resource_access(void *info);#ifndef COMPAT typedef long ret_t ;
Signature · 1 line
2.34.1
Re: [XEN PATCH 7/8] x86/platform_hypercall: address violations of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
PATCH 8/8 x86/sysctl: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
--- xen/arch/x86/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/sysctl.c +1 -1
@@ -118,7 +118,7 @@ long arch_do_sysctl(unsigned int cpu = sysctl->u.cpu_hotplug.cpu;unsigned int op = sysctl->u.cpu_hotplug.op;bool plug; -long (*fn)(void *); +long (*fn)(void *data);void *hcpu; switch ( op )
Signature · 1 line
2.34.1
Re: [XEN PATCH 8/8] x86/sysctl: address a violation of MISRA C:2012 Rule 8.2
Quoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>