Re: [PATCH 2/5] irqchip/renesas-rzg2l: Rename rzg2l_tint_eoi()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Biju,

On Mon, Feb 12, 2024 at 12:37 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> Rename rzg2l_tint_eoi->rzg2l_clear_tint_int and simplify the code by
> removing redundant priv and hw_irq local variables.
>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

> --- a/drivers/irqchip/irq-renesas-rzg2l.c
> +++ b/drivers/irqchip/irq-renesas-rzg2l.c
> @@ -103,11 +103,10 @@ static void rzg2l_irq_eoi(struct irq_data *d)
>                 writel_relaxed(iscr & ~bit, priv->base + ISCR);
>  }
>
> -static void rzg2l_tint_eoi(struct irq_data *d)
> +static void rzg2l_clear_tint_int(struct rzg2l_irqc_priv *priv,
> +                                unsigned int hwirq)
>  {
> -       unsigned int hw_irq = irqd_to_hwirq(d) - IRQC_TINT_START;
> -       struct rzg2l_irqc_priv *priv = irq_data_to_priv(d);
> -       u32 bit = BIT(hw_irq);
> +       u32 bit = BIT(hwirq - IRQC_TINT_START);
>         u32 reg;
>
>         reg = readl_relaxed(priv->base + TSCR);
> @@ -127,7 +126,7 @@ static void rzg2l_irqc_eoi(struct irq_data *d)
>         if (hw_irq >= IRQC_IRQ_START && hw_irq <= IRQC_IRQ_COUNT)
>                 rzg2l_irq_eoi(d);
>         else if (hw_irq >= IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ)
> -               rzg2l_tint_eoi(d);
> +               rzg2l_clear_tint_int(priv, hw_irq);

Perhaps pass the tint number (i.e. "hw_irq - IRQC_TINT_START") instead?

>         raw_spin_unlock(&priv->lock);
>         irq_chip_eoi_parent(d);

I think it makes sense to make a similar change to rzg2l_irq_eoi().

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux