diff mbox series

irqchip: renesas-rzg2l: Convert to irq_data_get_irq_chip_data()

Message ID 3241c1386e1ba0bc288496a36365bd764e17fdae.1695368979.git.geert+renesas@glider.be (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series irqchip: renesas-rzg2l: Convert to irq_data_get_irq_chip_data() | expand

Commit Message

Geert Uytterhoeven Sept. 22, 2023, 7:51 a.m. UTC
Use the existing irq_data_get_irq_chip_data() helper instead of
open-coding the same operation.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/irqchip/irq-renesas-rzg2l.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Biju Das Sept. 22, 2023, 7:57 a.m. UTC | #1
Hi Geert Uytterhoeven,

> Subject: [PATCH] irqchip: renesas-rzg2l: Convert to
> irq_data_get_irq_chip_data()
> 
> Use the existing irq_data_get_irq_chip_data() helper instead of open-coding
> the same operation.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/irqchip/irq-renesas-rzg2l.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-
> renesas-rzg2l.c
> index 4bbfa2b0a4df9b83..c0f3c09affa64511 100644
> --- a/drivers/irqchip/irq-renesas-rzg2l.c
> +++ b/drivers/irqchip/irq-renesas-rzg2l.c
> @@ -131,7 +131,7 @@ static void rzg2l_irqc_irq_enable(struct irq_data *d)
> 
>  	if (hw_irq >= IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) {
>  		struct rzg2l_irqc_priv *priv = irq_data_to_priv(d);
> -		unsigned long tint = (uintptr_t)d->chip_data;
> +		unsigned long tint = (uintptr_t)irq_data_get_irq_chip_data(d);

Maybe variable defintion in x-mas tree reverse order
for consistency??

Cheers,
Biju

>  		u32 offset = hw_irq - IRQC_TINT_START;
>  		u32 tssr_offset = TSSR_OFFSET(offset);
>  		u8 tssr_index = TSSR_INDEX(offset);
> --
> 2.34.1
Lad, Prabhakar Sept. 25, 2023, 7:43 a.m. UTC | #2
On Fri, Sep 22, 2023 at 9:09 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Use the existing irq_data_get_irq_chip_data() helper instead of
> open-coding the same operation.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/irqchip/irq-renesas-rzg2l.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Cheers,
Prabhakar

> diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c
> index 4bbfa2b0a4df9b83..c0f3c09affa64511 100644
> --- a/drivers/irqchip/irq-renesas-rzg2l.c
> +++ b/drivers/irqchip/irq-renesas-rzg2l.c
> @@ -131,7 +131,7 @@ static void rzg2l_irqc_irq_enable(struct irq_data *d)
>
>         if (hw_irq >= IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) {
>                 struct rzg2l_irqc_priv *priv = irq_data_to_priv(d);
> -               unsigned long tint = (uintptr_t)d->chip_data;
> +               unsigned long tint = (uintptr_t)irq_data_get_irq_chip_data(d);
>                 u32 offset = hw_irq - IRQC_TINT_START;
>                 u32 tssr_offset = TSSR_OFFSET(offset);
>                 u8 tssr_index = TSSR_INDEX(offset);
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c
index 4bbfa2b0a4df9b83..c0f3c09affa64511 100644
--- a/drivers/irqchip/irq-renesas-rzg2l.c
+++ b/drivers/irqchip/irq-renesas-rzg2l.c
@@ -131,7 +131,7 @@  static void rzg2l_irqc_irq_enable(struct irq_data *d)
 
 	if (hw_irq >= IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) {
 		struct rzg2l_irqc_priv *priv = irq_data_to_priv(d);
-		unsigned long tint = (uintptr_t)d->chip_data;
+		unsigned long tint = (uintptr_t)irq_data_get_irq_chip_data(d);
 		u32 offset = hw_irq - IRQC_TINT_START;
 		u32 tssr_offset = TSSR_OFFSET(offset);
 		u8 tssr_index = TSSR_INDEX(offset);