diff mbox series

xen/arm: irq: Constify the first parameter of platform_get_irq_byname()

Message ID 20230321171721.2502-1-julien@xen.org (mailing list archive)
State New, archived
Headers show
Series xen/arm: irq: Constify the first parameter of platform_get_irq_byname() | expand

Commit Message

Julien Grall March 21, 2023, 5:17 p.m. UTC
From: Julien Grall <jgrall@amazon.com>

platform_get_irq_byname() is not meant to modify the parameter 'np'. So
constify it.

Signed-off-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/include/asm/irq.h | 2 +-
 xen/arch/arm/irq.c             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Michal Orzel March 21, 2023, 5:52 p.m. UTC | #1
Hi Julien,

On 21/03/2023 18:17, Julien Grall wrote:
> 
> 
> From: Julien Grall <jgrall@amazon.com>
> 
> platform_get_irq_byname() is not meant to modify the parameter 'np'. So
> constify it.
> 
> Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>

~Michal
Stefano Stabellini March 21, 2023, 8:25 p.m. UTC | #2
On Tue, 20 Mar 2023, Michal Orzel wrote:
> Hi Julien,
> 
> On 21/03/2023 18:17, Julien Grall wrote:
> > 
> > 
> > From: Julien Grall <jgrall@amazon.com>
> > 
> > platform_get_irq_byname() is not meant to modify the parameter 'np'. So
> > constify it.
> > 
> > Signed-off-by: Julien Grall <jgrall@amazon.com>
> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
 
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
diff mbox series

Patch

diff --git a/xen/arch/arm/include/asm/irq.h b/xen/arch/arm/include/asm/irq.h
index af94f41994f1..11bc85d1110c 100644
--- a/xen/arch/arm/include/asm/irq.h
+++ b/xen/arch/arm/include/asm/irq.h
@@ -89,7 +89,7 @@  int irq_set_type(unsigned int irq, unsigned int type);
 
 int platform_get_irq(const struct dt_device_node *device, int index);
 
-int platform_get_irq_byname(struct dt_device_node *np, const char *name);
+int platform_get_irq_byname(const struct dt_device_node *np, const char *name);
 
 void irq_set_affinity(struct irq_desc *desc, const cpumask_t *cpu_mask);
 
diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index ded495792b7c..16e56f8945a8 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -718,7 +718,7 @@  int platform_get_irq(const struct dt_device_node *device, int index)
     return irq;
 }
 
-int platform_get_irq_byname(struct dt_device_node *np, const char *name)
+int platform_get_irq_byname(const struct dt_device_node *np, const char *name)
 {
 	int index;