xen: address violations of MISRA C:2012 Rule 8.2
cover xen: address violations of MISRA C:2012 Rule 8.2
This patch series adds some of the missing parameter names. No functional changes are introduced.
Federico Serafini (11):
xen/console: address violations of MISRA C:2012 Rule 8.2 xen/aclinux: address violations of MISRA C:2012 Rule 8.2 xen/cpumask: address violations of MISRA C:2012 Rule 8.2 xen/dmi: address a violation of MISRA C:2012 Rule 8.2 xen/domain: address violations of MISRA C:2012 Rule 8.2 xen/notifier: address violations of MISRA C:2012 Rule 8.2 xen/iommu: address violations of MISRA C:2012 Rule 8.2 xen/kernel: address a violation of MISRA C:2012 Rule 8.2 xen/param: address a violation of MISRA C:2012 Rule 8.2 xen/perfc: address a violation of MISRA C:2012 Rule 8.2 xen/serial: address a violation of MISRA C:2012 Rule 8.2
xen/drivers/char/console.c | 4 ++-- xen/include/acpi/platform/aclinux.h | 6 +++--- xen/include/xen/console.h | 2 +- xen/include/xen/cpumask.h | 6 ++++-- xen/include/xen/dmi.h | 2 +- xen/include/xen/domain.h | 14 +++++++------- xen/include/xen/iommu.h | 13 +++++++------ xen/include/xen/kernel.h | 2 +- xen/include/xen/notifier.h | 3 ++- xen/include/xen/param.h | 2 +- xen/include/xen/perfc.h | 2 +- xen/include/xen/serial.h | 2 +- 12 files changed, 31 insertions(+), 27 deletions(-)
Signature · 1 line
2.34.1
PATCH 8/11 xen/kernel: address a violation of MISRA C:2012 Rule 8.2
Add missing parameter name. No functional change.
--- xen/include/xen/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/xen/kernel.h +1 -1
@@ -112,7 +112,7 @@ struct vcpu;void show_execution_state (const struct cpu_user_regs *regs); void cf_check show_execution_state_nonconst(struct cpu_user_regs *regs); -void vcpu_show_execution_state (struct vcpu *); +void vcpu_show_execution_state (struct vcpu *v);#endif /* _LINUX_KERNEL_H */
Signature · 1 line
2.34.1
PATCH 2/11 xen/aclinux: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/include/acpi/platform/aclinux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/include/acpi/platform/aclinux.h +3 -3
@@ -75,9 +75,9 @@#define acpi_thread_id struct vcpu * -void *acpi_os_alloc_memory (size_t ); -void *acpi_os_zalloc_memory (size_t ); -void acpi_os_free_memory (void *); +void *acpi_os_alloc_memory (size_t sz); +void *acpi_os_zalloc_memory (size_t sz); +void acpi_os_free_memory (void *ptr);#define ACPI_ALLOCATE (a) acpi_os_alloc_memory(a)#define ACPI_ALLOCATE_ZEROED (a) acpi_os_zalloc_memory(a)
Signature · 1 line
2.34.1
PATCH 4/11 xen/dmi: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
--- xen/include/xen/dmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/xen/dmi.h +1 -1
@@ -24,7 +24,7 @@ struct dmi_strmatch { };struct dmi_system_id { -int (*callback)(const struct dmi_system_id *); +int (*callback)(const struct dmi_system_id *d);const char *ident;struct dmi_strmatch matches[4 ];void *driver_data;
Signature · 1 line
2.34.1
PATCH 10/11 xen/perfc: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
--- xen/include/xen/perfc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/xen/perfc.h +1 -1
@@ -94,7 +94,7 @@ DECLARE_PER_CPU(perfc_t[NUM_PERFCOUNTERS], perfcounters);#endif struct xen_sysctl_perfc_op ; -int perfc_control (struct xen_sysctl_perfc_op *); +int perfc_control (struct xen_sysctl_perfc_op *pc); extern void cf_check perfc_printall(unsigned char key); extern void cf_check perfc_reset(unsigned char key);
Signature · 1 line
2.34.1
PATCH 6/11 xen/notifier: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/include/xen/notifier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/include/xen/notifier.h +2 -1
@@ -23,7 +23,8 @@*/ struct notifier_block { -int (*notifier_call)(struct notifier_block *,unsigned long ,void *); +int (*notifier_call)(struct notifier_block *nfb,unsigned long action, +void *hcpu);struct list_head chain;int priority; };
Signature · 1 line
2.34.1
PATCH 5/11 xen/domain: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/include/xen/domain.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
xen/include/xen/domain.h +7 -7
@@ -25,7 +25,7 @@ unsigned int dom0_max_vcpus(void);int parse_arch_dom0_param (const char *s,const char *e);struct vcpu *alloc_dom0_vcpu0 (struct domain *dom0); -int vcpu_reset (struct vcpu *); +int vcpu_reset (struct vcpu *v);int vcpu_up (struct vcpu *v);void setup_system_domains (void );
@@ -65,9 +65,9 @@ void free_vcpu_struct(struct vcpu *v);/* Allocate/free a PIRQ structure. */ #ifndef alloc_pirq_struct -struct pirq *alloc_pirq_struct (struct domain *); +struct pirq *alloc_pirq_struct (struct domain *d);#endif -void cf_check free_pirq_struct(void *); +void cf_check free_pirq_struct(void *ptr);/* * Initialise/destroy arch-specific details of a VCPU.
@@ -103,8 +103,8 @@ void arch_domain_creation_finished(struct domain *d);void arch_p2m_set_access_required (struct domain *d,bool access_required); -int arch_set_info_guest (struct vcpu *,vcpu_guest_context_u ); -void arch_get_info_guest (struct vcpu *,vcpu_guest_context_u ); +int arch_set_info_guest (struct vcpu *v,vcpu_guest_context_u c); +void arch_get_info_guest (struct vcpu *v,vcpu_guest_context_u c);int arch_initialise_vcpu (struct vcpu *v,XEN_GUEST_HANDLE_PARAM (void ) arg);int default_initialise_vcpu (struct vcpu *v,XEN_GUEST_HANDLE_PARAM (void ) arg);
@@ -112,7 +112,7 @@ int default_initialise_vcpu(struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg);int arch_get_paging_mempool_size (struct domain *d,uint64_t *size/* bytes */ );int arch_set_paging_mempool_size (struct domain *d,uint64_t size/* bytes */ ); -bool update_runstate_area (struct vcpu *); +bool update_runstate_area (struct vcpu *v);int domain_relinquish_resources (struct domain *d);
@@ -122,7 +122,7 @@ void arch_dump_vcpu_info(struct vcpu *v);void arch_dump_domain_info (struct domain *d); -int arch_vcpu_reset (struct vcpu *); +int arch_vcpu_reset (struct vcpu *v);bool domctl_lock_acquire (void );void domctl_lock_release (void );
Signature · 1 line
2.34.1
PATCH 9/11 xen/param: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
--- xen/include/xen/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/xen/param.h +1 -1
@@ -22,7 +22,7 @@ struct kernel_param {unsigned int len;union {void *var; -int (*func)(const char *); +int (*func)(const char *s); } par; };
Signature · 1 line
2.34.1
PATCH 7/11 xen/iommu: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names to address violations of MISRA C:2012 Rule 8.2 and remove uses of u{8,16,32} in favor of C standard types. No functional change.
--- xen/include/xen/iommu.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
xen/include/xen/iommu.h +7 -6
@@ -262,14 +262,15 @@ struct iommu_ops {int (*init)(struct domain *d);void (*hwdom_init)(struct domain *d);int (*quarantine_init)(device_t *dev,bool scratch_page); -int (*add_device)(u8 devfn,device_t *dev); +int (*add_device)(uint8_t devfn,device_t *dev);int (*enable_device)(device_t *dev); -int (*remove_device)(u8 devfn,device_t *dev); -int (*assign_device)(struct domain *,u8 devfn,device_t *dev,u32 flag); +int (*remove_device)(uint8_t devfn,device_t *dev); +int (*assign_device)(struct domain *d,uint8_t devfn,device_t *dev, +uint32_t flag);int (*reassign_device)(struct domain *s,struct domain *t, -u8 devfn,device_t *dev); +uint8_t devfn,device_t *dev);#ifdef CONFIG_HAS_PCI -int (*get_device_group_id)(u16 seg,u8 bus,u8 devfn); +int (*get_device_group_id)(uint16_t seg,uint8_t bus,uint8_t devfn);#endif /* HAS_PCI */ void (*teardown)(struct domain *d);
@@ -308,7 +309,7 @@ struct iommu_ops {int __must_check (*iotlb_flush)(struct domain *d,dfn_t dfn,unsigned long page_count,unsigned int flush_flags); -int (*get_reserved_device_memory)(iommu_grdm_t *,void *); +int (*get_reserved_device_memory)(iommu_grdm_t *func,void *ctxt);void (*dump_page_tables)(struct domain *d);#ifdef CONFIG_HAS_DEVICE_TREE
Signature · 1 line
2.34.1
PATCH 11/11 xen/serial: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter name. No functional change.
---
In my previous patch for serial.h I missed one parameter: sorry for that.
--- xen/include/xen/serial.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/xen/serial.h +1 -1
@@ -181,7 +181,7 @@ static void inline xhci_dbc_uart_init(void) {};void arm_uart_init (void );struct physdev_dbgp_op ; -int dbgp_op (const struct physdev_dbgp_op *); +int dbgp_op (const struct physdev_dbgp_op *op);/* Baud rate was pre-configured before invoking the UART driver. */ #define BAUD_AUTO (-1)
Signature · 1 line
2.34.1
PATCH 3/11 xen/cpumask: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/include/xen/cpumask.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
xen/include/xen/cpumask.h +4 -2
@@ -460,7 +460,9 @@ extern cpumask_t cpu_present_map;/* Copy to/from cpumap provided by control tools. */ struct xenctl_bitmap ; -int cpumask_to_xenctl_bitmap (struct xenctl_bitmap *,const cpumask_t *); -int xenctl_bitmap_to_cpumask (cpumask_var_t *,const struct xenctl_bitmap *); +int cpumask_to_xenctl_bitmap (struct xenctl_bitmap *xenctl_cpumap, +const cpumask_t *cpumask); +int xenctl_bitmap_to_cpumask (cpumask_var_t *cpumask, +const struct xenctl_bitmap *xenctl_cpumap);#endif /* __XEN_CPUMASK_H */
Signature · 1 line
2.34.1
PATCH 1/11 xen/console: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniAdd missing parameter names. No functional change.
--- xen/drivers/char/console.c | 4 ++-- xen/include/xen/console.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
xen/drivers/char/console.c +2 -2
@@ -393,9 +393,9 @@ long read_console_ring(struct xen_sysctl_readconsole *op)static char serial_rx_ring[SERIAL_RX_SIZE ];static unsigned int serial_rx_cons, serial_rx_prod; -static void (*serial_steal_fn)(const char *,size_t nr) = early_puts; +static void (*serial_steal_fn)(const char *str,size_t nr) = early_puts; -int console_steal (int handle,void (*fn)(const char *,size_t nr)) +int console_steal (int handle,void (*fn)(const char *str,size_t nr)) {if ( (handle ==-1 ) || (handle != sercon_handle) )return 0 ;
xen/include/xen/console.h +1 -1
@@ -36,7 +36,7 @@ struct domain *console_input_domain(void);* Steal output from the console. Returns +ve identifier, else -ve error. * Takes the handle of the serial line to steal, and steal callback function. */ -int console_steal (int handle,void (*fn)(const char *,size_t nr)); +int console_steal (int handle,void (*fn)(const char *str,size_t nr));/* Give back stolen console. Takes the identifier returned by console_steal. */ void console_giveback (int id);
Signature · 1 line
2.34.1
Re: [XEN PATCH 01/11] xen/console: 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]>
Re: [XEN PATCH 02/11] xen/aclinux: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Albeit as to the subject: There's no component named "aclinux" in Xen. I think this wants to be "acpi".
Jan
Re: [XEN PATCH 03/11] xen/cpumask: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
irrespective of this being one of the examples where types alone are entirely sufficient and descriptive.
Jan
Quoted 14 lines
xen/include/xen/cpumask.h +4
-2@@ -460,7 +460,9 @@ extern cpumask_t cpu_present_map;/* Copy to/from cpumap provided by control tools. */ struct xenctl_bitmap ; -int cpumask_to_xenctl_bitmap (struct xenctl_bitmap *,const cpumask_t *); -int xenctl_bitmap_to_cpumask (cpumask_var_t *,const struct xenctl_bitmap *); +int cpumask_to_xenctl_bitmap (struct xenctl_bitmap *xenctl_cpumap, +const cpumask_t *cpumask); +int xenctl_bitmap_to_cpumask (cpumask_var_t *cpumask, +const struct xenctl_bitmap *xenctl_cpumap);#endif /* __XEN_CPUMASK_H */
Re: [XEN PATCH 04/11] xen/dmi: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 06/11] xen/notifier: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 05/11] xen/domain: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 08/11] xen/kernel: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 07/11] xen/iommu: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 5 lines · Federico Serafini
Add missing parameter names to address violations of MISRA C:2012 Rule 8.2 and remove uses of u{8,16,32} in favor of C standard types. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 09/11] xen/param: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
xen/include/xen/param.h struct kernel_param { · line 25
Quoted 8 lines
xen/include/xen/param.h +1
-1@@ -22,7 +22,7 @@ struct kernel_param {unsigned int len;union {void *var; -int (*func)(const char *); +int (*func)(const char *s);
Still I again wonder what good this name does us here.
Jan
Re: [XEN PATCH 10/11] xen/perfc: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 11/11] xen/serial: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 05/11] xen/domain: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 06/11] xen/notifier: address violations of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter names. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 08/11] xen/kernel: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 09/11] xen/param: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 10/11] xen/perfc: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>
Re: [XEN PATCH 11/11] xen/serial: address a violation of MISRA C:2012 Rule 8.2
In reply to Federico SerafiniQuoted 3 lines · Federico Serafini
Add missing parameter name. No functional change.
Signed-off-by Federico Serafini <[email protected]>