diff mbox series

[XEN] xen/irq: address violations of MISRA C:2012 Rule 8.2

Message ID fc077d4dba9c37d9d81cea5d184e59f00c3cdcd4.1696242264.git.federico.serafini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series [XEN] xen/irq: address violations of MISRA C:2012 Rule 8.2 | expand

Commit Message

Federico Serafini Oct. 2, 2023, 10:36 a.m. UTC
Add missing parameter names. No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/arch/arm/irq.c             |  3 ++-
 xen/arch/x86/include/asm/irq.h |  4 ++--
 xen/arch/x86/irq.c             |  8 ++++----
 xen/include/xen/irq.h          | 21 +++++++++++----------
 4 files changed, 19 insertions(+), 17 deletions(-)

Comments

Stefano Stabellini Oct. 2, 2023, 10:45 p.m. UTC | #1
On Mon, 2 Oct 2023, Federico Serafini wrote:
> Add missing parameter names. No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Henry Wang Oct. 3, 2023, 12:19 a.m. UTC | #2
Hi,

> On Oct 3, 2023, at 06:45, Stefano Stabellini <sstabellini@kernel.org> wrote:
> 
> On Mon, 2 Oct 2023, Federico Serafini wrote:
>> Add missing parameter names. No functional change.
>> 
>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry
Jan Beulich Oct. 16, 2023, 3:14 p.m. UTC | #3
On 03.10.2023 00:45, Stefano Stabellini wrote:
> On Mon, 2 Oct 2023, Federico Serafini wrote:
>> Add missing parameter names. 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>
Jan Beulich Oct. 16, 2023, 3:14 p.m. UTC | #4
On 03.10.2023 02:19, Henry Wang wrote:
>> On Oct 3, 2023, at 06:45, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>
>> On Mon, 2 Oct 2023, Federico Serafini wrote:
>>> Add missing parameter names. No functional change.
>>>
>>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
>>
>> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Same question here wrt applicability now that we're past RC3.

Jan
Henry Wang Oct. 17, 2023, 1:01 a.m. UTC | #5
> On Oct 16, 2023, at 23:14, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 03.10.2023 02:19, Henry Wang wrote:
>>> On Oct 3, 2023, at 06:45, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>> 
>>> On Mon, 2 Oct 2023, Federico Serafini wrote:
>>>> Add missing parameter names. No functional change.
>>>> 
>>>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
>>> 
>>> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>> 
>> Release-acked-by: Henry Wang <Henry.Wang@arm.com>
> 
> Same question here wrt applicability now that we're past RC3.

Same answer here for this patch, as this is a simple one and nothing behavioral
is expected to change. So I am ok to commit this.

Kind regards,
Henry

> 
> Jan
diff mbox series

Patch

diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index 09648db17a..1f05ecdee5 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -182,7 +182,8 @@  void irq_set_affinity(struct irq_desc *desc, const cpumask_t *mask)
 }
 
 int request_irq(unsigned int irq, unsigned int irqflags,
-                void (*handler)(int, void *, struct cpu_user_regs *),
+                void (*handler)(int irq, void *dev_id,
+                                struct cpu_user_regs *regs),
                 const char *devname, void *dev_id)
 {
     struct irqaction *action;
diff --git a/xen/arch/x86/include/asm/irq.h b/xen/arch/x86/include/asm/irq.h
index ad907fc97f..a87af47ece 100644
--- a/xen/arch/x86/include/asm/irq.h
+++ b/xen/arch/x86/include/asm/irq.h
@@ -101,9 +101,9 @@  void cf_check irq_move_cleanup_interrupt(struct cpu_user_regs *regs);
 uint8_t alloc_hipriority_vector(void);
 
 void set_direct_apic_vector(
-    uint8_t vector, void (*handler)(struct cpu_user_regs *));
+    uint8_t vector, void (*handler)(struct cpu_user_regs *regs));
 void alloc_direct_apic_vector(
-    uint8_t *vector, void (*handler)(struct cpu_user_regs *));
+    uint8_t *vector, void (*handler)(struct cpu_user_regs *regs));
 
 void do_IRQ(struct cpu_user_regs *regs);
 
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 6abfd81621..f42ad539dc 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -915,16 +915,16 @@  uint8_t alloc_hipriority_vector(void)
     return next++;
 }
 
-static void (*direct_apic_vector[X86_NR_VECTORS])(struct cpu_user_regs *);
+static void (*direct_apic_vector[X86_NR_VECTORS])(struct cpu_user_regs *regs);
 void set_direct_apic_vector(
-    uint8_t vector, void (*handler)(struct cpu_user_regs *))
+    uint8_t vector, void (*handler)(struct cpu_user_regs *regs))
 {
     BUG_ON(direct_apic_vector[vector] != NULL);
     direct_apic_vector[vector] = handler;
 }
 
 void alloc_direct_apic_vector(
-    uint8_t *vector, void (*handler)(struct cpu_user_regs *))
+    uint8_t *vector, void (*handler)(struct cpu_user_regs *regs))
 {
     static DEFINE_SPINLOCK(lock);
 
@@ -964,7 +964,7 @@  static int __init cf_check irq_ratelimit_init(void)
 __initcall(irq_ratelimit_init);
 
 int __init request_irq(unsigned int irq, unsigned int irqflags,
-        void (*handler)(int, void *, struct cpu_user_regs *),
+        void (*handler)(int irq, void *dev_id, struct cpu_user_regs *regs),
         const char * devname, void *dev_id)
 {
     struct irqaction * action;
diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h
index 9747e818f7..58d462e8e6 100644
--- a/xen/include/xen/irq.h
+++ b/xen/include/xen/irq.h
@@ -18,7 +18,7 @@ 
     ASSERT(!in_irq() && (local_irq_is_enabled() || num_online_cpus() <= 1))
 
 struct irqaction {
-    void (*handler)(int, void *, struct cpu_user_regs *);
+    void (*handler)(int irq, void *dev_id, struct cpu_user_regs *regs);
     const char *name;
     void *dev_id;
     bool_t free_on_release;
@@ -62,17 +62,17 @@  struct irq_desc;
  */
 struct hw_interrupt_type {
     const char *typename;
-    unsigned int (*startup)(struct irq_desc *);
-    void (*shutdown)(struct irq_desc *);
-    void (*enable)(struct irq_desc *);
-    void (*disable)(struct irq_desc *);
-    void (*ack)(struct irq_desc *);
+    unsigned int (*startup)(struct irq_desc *desc);
+    void (*shutdown)(struct irq_desc *desc);
+    void (*enable)(struct irq_desc *desc);
+    void (*disable)(struct irq_desc *desc);
+    void (*ack)(struct irq_desc *desc);
 #ifdef CONFIG_X86
-    void (*end)(struct irq_desc *, u8 vector);
+    void (*end)(struct irq_desc *desc, u8 vector);
 #else
-    void (*end)(struct irq_desc *);
+    void (*end)(struct irq_desc *desc);
 #endif
-    void (*set_affinity)(struct irq_desc *, const cpumask_t *);
+    void (*set_affinity)(struct irq_desc *desc, const cpumask_t *mask);
 };
 
 typedef const struct hw_interrupt_type hw_irq_controller;
@@ -119,7 +119,8 @@  extern int setup_irq(unsigned int irq, unsigned int irqflags,
                      struct irqaction *new);
 extern void release_irq(unsigned int irq, const void *dev_id);
 extern int request_irq(unsigned int irq, unsigned int irqflags,
-               void (*handler)(int, void *, struct cpu_user_regs *),
+               void (*handler)(int irq, void *dev_id,
+                     struct cpu_user_regs *regs),
                const char *devname, void *dev_id);
 
 extern hw_irq_controller no_irq_type;