[PATCH for-4.19] xen/irq: Address MISRA Rule 8.3 violation

Andrew Cooper posted 1 patch 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20240618130048.1768639-1-andrew.cooper3@citrix.com
xen/arch/arm/irq.c    | 4 ++--
xen/include/xen/irq.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
[PATCH for-4.19] xen/irq: Address MISRA Rule 8.3 violation
Posted by Andrew Cooper 5 months ago
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")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: George Dunlap <George.Dunlap@citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
CC: Bertrand Marquis <bertrand.marquis@arm.com>
CC: Michal Orzel <michal.orzel@amd.com>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
CC: Roberto Bagnara <roberto.bagnara@bugseng.com>
CC: Nicola Vetrini <nicola.vetrini@bugseng.com>
CC: consulting@bugseng.com <consulting@bugseng.com>

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(-)

diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index c60502444ccf..6b89f64fd194 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -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)
diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h
index adf33547d25f..580ae37e7428 100644
--- a/xen/include/xen/irq.h
+++ b/xen/include/xen/irq.h
@@ -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
-- 
2.39.2
Re: [PATCH for-4.19] xen/irq: Address MISRA Rule 8.3 violation
Posted by Oleksii K. 5 months ago
On Tue, 2024-06-18 at 14:00 +0100, Andrew Cooper wrote:
> 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")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

~ Oleksii

> ---
> CC: George Dunlap <George.Dunlap@citrix.com>
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Julien Grall <julien@xen.org>
> CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
> CC: Bertrand Marquis <bertrand.marquis@arm.com>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> CC: Roberto Bagnara <roberto.bagnara@bugseng.com>
> CC: Nicola Vetrini <nicola.vetrini@bugseng.com>
> CC: consulting@bugseng.com <consulting@bugseng.com>
> 
> 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(-)
> 
> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
> index c60502444ccf..6b89f64fd194 100644
> --- a/xen/arch/arm/irq.c
> +++ b/xen/arch/arm/irq.c
> @@ -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)
> diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h
> index adf33547d25f..580ae37e7428 100644
> --- a/xen/include/xen/irq.h
> +++ b/xen/include/xen/irq.h
> @@ -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
Re: [PATCH for-4.19] xen/irq: Address MISRA Rule 8.3 violation
Posted by Julien Grall 5 months ago
Hi Andrew,

On 18/06/2024 14:00, Andrew Cooper wrote:
> 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")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,

-- 
Julien Grall
Re: [PATCH for-4.19] xen/irq: Address MISRA Rule 8.3 violation
Posted by Jan Beulich 5 months ago
On 18.06.2024 15:00, Andrew Cooper wrote:
> 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")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

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