All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH 0/4] xen/x86: address some violations of MISRA C:2012 Rules 8.2 and 8.3
@ 2023-09-06  8:57 Federico Serafini
  2023-09-06  8:57 ` [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Federico Serafini @ 2023-09-06  8:57 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Wei Liu

This serie addresses some violations of MISRA C:2012 Rules 8.2 and 8.3
for x86-64.

Federico Serafini (4):
  x86/genapic: address a violation of MISRA C:2012 Rule 8.3
  x86/io: address violations of MISRA C:2012 Rule 8.3
  x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3
  xen/vpci: address a violation of MISRA C:2012 Rule 8.3

 xen/arch/x86/include/asm/genapic.h | 2 +-
 xen/arch/x86/include/asm/hap.h     | 2 +-
 xen/arch/x86/include/asm/io.h      | 2 +-
 xen/arch/x86/include/asm/io_apic.h | 4 ++--
 xen/include/xen/vpci.h             | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3
  2023-09-06  8:57 [XEN PATCH 0/4] xen/x86: address some violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
@ 2023-09-06  8:57 ` Federico Serafini
  2023-09-07 13:24   ` Jan Beulich
  2023-09-06  8:57 ` [XEN PATCH 2/4] x86/io: address violations " Federico Serafini
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Federico Serafini @ 2023-09-06  8:57 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Wei Liu

Make function delcaration consistent with the corresponding definition.
No functional change.

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

diff --git a/xen/arch/x86/include/asm/genapic.h b/xen/arch/x86/include/asm/genapic.h
index beeaddf19d..970df8ffe0 100644
--- a/xen/arch/x86/include/asm/genapic.h
+++ b/xen/arch/x86/include/asm/genapic.h
@@ -43,7 +43,7 @@ void cf_check send_IPI_self_legacy(uint8_t vector);
 
 void cf_check init_apic_ldr_flat(void);
 unsigned int cf_check cpu_mask_to_apicid_flat(const cpumask_t *cpumask);
-void cf_check send_IPI_mask_flat(const cpumask_t *mask, int vector);
+void cf_check send_IPI_mask_flat(const cpumask_t *cpumask, int vector);
 const cpumask_t *cf_check vector_allocation_cpumask_flat(int cpu);
 #define GENAPIC_FLAT \
 	.int_delivery_mode = dest_LowestPrio, \
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [XEN PATCH 2/4] x86/io: address violations of MISRA C:2012 Rule 8.3
  2023-09-06  8:57 [XEN PATCH 0/4] xen/x86: address some violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
  2023-09-06  8:57 ` [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
@ 2023-09-06  8:57 ` Federico Serafini
  2023-09-07 13:25   ` Jan Beulich
  2023-09-06  8:57 ` [XEN PATCH 3/4] x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
  2023-09-06  8:57 ` [XEN PATCH 4/4] xen/vpci: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
  3 siblings, 1 reply; 9+ messages in thread
From: Federico Serafini @ 2023-09-06  8:57 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Wei Liu

Make declarations consistent, no functional change.

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

diff --git a/xen/arch/x86/include/asm/io.h b/xen/arch/x86/include/asm/io.h
index 92b784a861..8c8a15bd06 100644
--- a/xen/arch/x86/include/asm/io.h
+++ b/xen/arch/x86/include/asm/io.h
@@ -51,6 +51,6 @@ __OUT(l,,int)
 #define IOEMUL_QUIRK_STUB_BYTES 9
 struct cpu_user_regs;
 extern unsigned int (*ioemul_handle_quirk)(
-    u8 opcode, char *io_emul_stub, struct cpu_user_regs *regs);
+    uint8_t opcode, char *io_emul_stub, struct cpu_user_regs *regs);
 
 #endif
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [XEN PATCH 3/4] x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3
  2023-09-06  8:57 [XEN PATCH 0/4] xen/x86: address some violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
  2023-09-06  8:57 ` [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
  2023-09-06  8:57 ` [XEN PATCH 2/4] x86/io: address violations " Federico Serafini
@ 2023-09-06  8:57 ` Federico Serafini
  2023-09-07 13:27   ` Jan Beulich
  2023-09-06  8:57 ` [XEN PATCH 4/4] xen/vpci: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
  3 siblings, 1 reply; 9+ messages in thread
From: Federico Serafini @ 2023-09-06  8:57 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Wei Liu

Add missing parameter names and make function declarations and
definitions consistent.

No functional change.

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

diff --git a/xen/arch/x86/include/asm/io_apic.h b/xen/arch/x86/include/asm/io_apic.h
index 9165da2281..a7e4c9e146 100644
--- a/xen/arch/x86/include/asm/io_apic.h
+++ b/xen/arch/x86/include/asm/io_apic.h
@@ -199,7 +199,7 @@ extern struct IO_APIC_route_entry __ioapic_read_entry(
     unsigned int apic, unsigned int pin, bool raw);
 void __ioapic_write_entry(
     unsigned int apic, unsigned int pin, bool raw,
-    struct IO_APIC_route_entry);
+    struct IO_APIC_route_entry e);
 
 extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
 extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
@@ -211,6 +211,6 @@ extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries,
 unsigned highest_gsi(void);
 
 int ioapic_guest_read( unsigned long physbase, unsigned int reg, u32 *pval);
-int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 pval);
+int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val);
 
 #endif
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [XEN PATCH 4/4] xen/vpci: address a violation of MISRA C:2012 Rule 8.3
  2023-09-06  8:57 [XEN PATCH 0/4] xen/x86: address some violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
                   ` (2 preceding siblings ...)
  2023-09-06  8:57 ` [XEN PATCH 3/4] x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
@ 2023-09-06  8:57 ` Federico Serafini
  2023-09-07 13:32   ` Jan Beulich
  3 siblings, 1 reply; 9+ messages in thread
From: Federico Serafini @ 2023-09-06  8:57 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Federico Serafini, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Wei Liu

Make function declarations and definitions consistent.
No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/arch/x86/include/asm/hap.h | 2 +-
 xen/include/xen/vpci.h         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/hap.h b/xen/arch/x86/include/asm/hap.h
index 9d12327b12..05e124ad57 100644
--- a/xen/arch/x86/include/asm/hap.h
+++ b/xen/arch/x86/include/asm/hap.h
@@ -30,7 +30,7 @@ void  hap_vcpu_init(struct vcpu *v);
 int   hap_track_dirty_vram(struct domain *d,
                            unsigned long begin_pfn,
                            unsigned int nr_frames,
-                           XEN_GUEST_HANDLE(void) dirty_bitmap);
+                           XEN_GUEST_HANDLE(void) guest_dirty_bitmap);
 
 extern const struct paging_mode *hap_paging_get_mode(struct vcpu *);
 int hap_set_allocation(struct domain *d, unsigned int pages, bool *preempted);
diff --git a/xen/include/xen/vpci.h b/xen/include/xen/vpci.h
index 0b8a2a3c74..d743d96a10 100644
--- a/xen/include/xen/vpci.h
+++ b/xen/include/xen/vpci.h
@@ -26,7 +26,7 @@ typedef int vpci_register_init_t(struct pci_dev *dev);
                __used_section(".data.vpci." p) = x
 
 /* Add vPCI handlers to device. */
-int __must_check vpci_add_handlers(struct pci_dev *dev);
+int __must_check vpci_add_handlers(struct pci_dev *pdev);
 
 /* Remove all handlers and free vpci related structures. */
 void vpci_remove_device(struct pci_dev *pdev);
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3
  2023-09-06  8:57 ` [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
@ 2023-09-07 13:24   ` Jan Beulich
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2023-09-07 13:24 UTC (permalink / raw)
  To: Federico Serafini
  Cc: consulting, Andrew Cooper, Roger Pau Monné, Wei Liu,
	xen-devel

On 06.09.2023 10:57, Federico Serafini wrote:
> Make function delcaration consistent with the corresponding definition.
> No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Jan Beulich <jbeulich@suse.com>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [XEN PATCH 2/4] x86/io: address violations of MISRA C:2012 Rule 8.3
  2023-09-06  8:57 ` [XEN PATCH 2/4] x86/io: address violations " Federico Serafini
@ 2023-09-07 13:25   ` Jan Beulich
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2023-09-07 13:25 UTC (permalink / raw)
  To: Federico Serafini
  Cc: consulting, Andrew Cooper, Roger Pau Monné, Wei Liu,
	xen-devel

On 06.09.2023 10:57, Federico Serafini wrote:
> Make declarations consistent, no functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Jan Beulich <jbeulich@suse.com>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [XEN PATCH 3/4] x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3
  2023-09-06  8:57 ` [XEN PATCH 3/4] x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
@ 2023-09-07 13:27   ` Jan Beulich
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2023-09-07 13:27 UTC (permalink / raw)
  To: Federico Serafini
  Cc: consulting, Andrew Cooper, Roger Pau Monné, Wei Liu,
	xen-devel

On 06.09.2023 10:57, Federico Serafini wrote:
> Add missing parameter names and make function declarations and
> definitions consistent.
> 
> No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Jan Beulich <jbeulich@suse.com>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [XEN PATCH 4/4] xen/vpci: address a violation of MISRA C:2012 Rule 8.3
  2023-09-06  8:57 ` [XEN PATCH 4/4] xen/vpci: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
@ 2023-09-07 13:32   ` Jan Beulich
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2023-09-07 13:32 UTC (permalink / raw)
  To: Federico Serafini
  Cc: consulting, Andrew Cooper, Roger Pau Monné, Wei Liu,
	xen-devel

On 06.09.2023 10:57, Federico Serafini wrote:
> --- a/xen/arch/x86/include/asm/hap.h
> +++ b/xen/arch/x86/include/asm/hap.h
> @@ -30,7 +30,7 @@ void  hap_vcpu_init(struct vcpu *v);
>  int   hap_track_dirty_vram(struct domain *d,
>                             unsigned long begin_pfn,
>                             unsigned int nr_frames,
> -                           XEN_GUEST_HANDLE(void) dirty_bitmap);
> +                           XEN_GUEST_HANDLE(void) guest_dirty_bitmap);
>  
>  extern const struct paging_mode *hap_paging_get_mode(struct vcpu *);
>  int hap_set_allocation(struct domain *d, unsigned int pages, bool *preempted);

How is this related to vPCI? Plus if you change the HAP function, please
adjust its shadow counterpart too.

Jan


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-07 13:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-06  8:57 [XEN PATCH 0/4] xen/x86: address some violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
2023-09-06  8:57 ` [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
2023-09-07 13:24   ` Jan Beulich
2023-09-06  8:57 ` [XEN PATCH 2/4] x86/io: address violations " Federico Serafini
2023-09-07 13:25   ` Jan Beulich
2023-09-06  8:57 ` [XEN PATCH 3/4] x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3 Federico Serafini
2023-09-07 13:27   ` Jan Beulich
2023-09-06  8:57 ` [XEN PATCH 4/4] xen/vpci: address a violation of MISRA C:2012 Rule 8.3 Federico Serafini
2023-09-07 13:32   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.