Skip to contentSkip to conversation

xen/irq: Address MISRA Rule 8.3 violation

PATCH In review Andrew Cooper 4 participants 4 messages Jun 18, 2024 – Jun 19, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/irq: Address MISRA Rule 8.3 violation

When centralising irq_ack_none(), different architectures had different names for the parameter of irq_ack_none(). As it's type is struct irq_desc *, it should be named desc. Make this consistent.

No functional change.

Fixes 8aeda4a241ab ("arch/irq: Make irq_ack_none() mandatory")

---
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Bertrand Marquis <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Oleksii Kurochko <[email protected]>
CC: Roberto Bagnara <[email protected]>
CC: Nicola Vetrini <[email protected]>
CC: [email protected] <[email protected]>

Request for 4.19. This was an accidental regression in a recent cleanup patch, and the fix is just a rename - its no functional change.

---
 xen/arch/arm/irq.c    | 4 ++--
 xen/include/xen/irq.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/irq.c +2 -2
index c60502444ccf..6b89f64fd194 100644
@@ -31,9 +31,9 @@ struct irq_guest
     unsigned int virq;
 };
 
-void irq_ack_none(struct irq_desc *irq)
+void irq_ack_none(struct irq_desc *desc)
 {
-    printk("unexpected IRQ trap at irq %02x\n", irq->irq);
+    printk("unexpected IRQ trap at irq %02x\n", desc->irq);
 }
 
 void irq_end_none(struct irq_desc *irq)
xen/include/xen/irq.h +1 -1
index adf33547d25f..580ae37e7428 100644
@@ -134,7 +134,7 @@ void cf_check irq_actor_none(struct irq_desc *desc);
  * irq_ack_none() must be provided by the architecture.
  * irq_end_none() is optional, and opted into using a define.
  */
-void cf_check irq_ack_none(struct irq_desc *irq);
+void cf_check irq_ack_none(struct irq_desc *desc);
 
 /*
  * Per-cpu interrupted context register state - the inner-most interrupt frame

base-commit: 8b4243a9b560c89bb259db5a27832c253d4bebc7

Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Andrew Cooper

When centralising irq_ack_none(), different architectures had different names for the parameter of irq_ack_none(). As it's type is struct irq_desc *, it should be named desc. Make this consistent.

No functional change.

Fixes 8aeda4a241ab ("arch/irq: Make irq_ack_none() mandatory")
Acked-by on v1 1/1
#2 lore raw
In reply to Andrew Cooper

Hi Andrew,

Quoted 8 lines · Andrew Cooper

When centralising irq_ack_none(), different architectures had different names for the parameter of irq_ack_none(). As it's type is struct irq_desc *, it should be named desc. Make this consistent.

No functional change.

Fixes 8aeda4a241ab ("arch/irq: Make irq_ack_none() mandatory")

Cheers,

Signature · 1 line
Julien Grall
#3 lore raw
In reply to Andrew Cooper
Quoted 10 lines · Andrew Cooper

When centralising irq_ack_none(), different architectures had different names
for the parameter of irq_ack_none().  As it's type is struct irq_desc *, it
should be named desc.  Make this consistent.

No functional change.

Fixes 8aeda4a241ab ("arch/irq: Make irq_ack_none() mandatory")

~ Oleksii

Quoted 54 lines

---
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Bertrand Marquis <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Oleksii Kurochko <[email protected]>
CC: Roberto Bagnara <[email protected]>
CC: Nicola Vetrini <[email protected]>
CC: [email protected] <[email protected]>

Request for 4.19.  This was an accidental regression in a recent cleanup
patch, and the fix is just a rename - its no functional change.
---
 xen/arch/arm/irq.c    | 4 ++--
 xen/include/xen/irq.h | 2 +-

 2 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/irq.c +0 -0
index c60502444ccf..6b89f64fd194 100644
@@ -31,9 +31,9 @@ struct irq_guest
      unsigned int virq;
  };

xen/arch/arm/irq.c +1 -1
-void irq_ack_none(struct irq_desc *irq)
+void irq_ack_none(struct irq_desc *desc)

 {
-    printk("unexpected IRQ trap at irq %02x\n", irq->irq); +    printk("unexpected IRQ trap at irq %02x\n", desc->irq); }

 void irq_end_none(struct irq_desc *irq)

xen/include/xen/irq.h +1 -1
index adf33547d25f..580ae37e7428 100644
@@ -134,7 +134,7 @@ void cf_check irq_actor_none(struct irq_desc
 *desc);
   * irq_ack_none() must be provided by the architecture.
   * irq_end_none() is optional, and opted into using a define.
   */
-void cf_check irq_ack_none(struct irq_desc *irq);
+void cf_check irq_ack_none(struct irq_desc *desc);


 /*
  * Per-cpu interrupted context register state - the inner-most interrupt frame

base-commit: 8b4243a9b560c89bb259db5a27832c253d4bebc7