public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Biju <biju.das.au@gmail.com>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Biju Das <biju.das.au@gmail.com>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3 7/9] irqchip/renesas-rzg2l: Add RZ/G3L support
Date: Fri, 06 Feb 2026 12:58:30 +0100	[thread overview]
Message-ID: <874inu13tl.ffs@tglx> (raw)
In-Reply-To: <20260206111658.231934-8-biju.das.jz@bp.renesas.com>

On Fri, Feb 06 2026 at 11:16, Biju wrote:
>  /**
>   * struct rzg2l_hw_info - Interrupt Control Unit controller hardware info structure.
> + * @tssel_lut:		TINT lookup table
>   * @irq_count:		Number of IRQC interrupts
>   * @tint_start:		Start of TINT interrupts
>   * @num_irq:		Total Number of interrupts
>   */
>  struct rzg2l_hw_info {
> -	u8	irq_count;
> -	u8	tint_start;
> -	u8	num_irq;
> +	const u8	*tssel_lut;

You can spare that churn by indenting this correctly from the beginning.

> +	u8		irq_count;
> +	u8		tint_start;
> +	u8		num_irq;
>  };

> @@ -343,6 +345,9 @@ static u32 rzg2l_disable_tint_and_set_tint_source(struct irq_data *d, struct rzg
>  	u32 tint = (u32)(uintptr_t)irq_data_get_irq_chip_data(d);
>  	u32 tien = reg & (TIEN << TSSEL_SHIFT(tssr_offset));
>  
> +	if (priv->info->tssel_lut)
> +		tint = priv->info->tssel_lut[tint];

I'd rather make it very clear in the code:

	if (priv->info->tssel_lut)
		tint = priv->info->tssel_lut[tint];
        else
        	tint = (u32)(uintptr_t)irq_data_get_irq_chip_data(d);

rather than read first and overwrite somewhere else.
  
> +/* Mapping based on port index on Table 4.2-1 and GPIOINT on Table 4.6-7 */
> +static const u8 rzg3l_tssel_lut[] = {
> +	83, 84,					/* P20-P21 */
> +	7, 8, 9, 10, 11, 12, 13,		/* P30-P36 */
> +	85, 86, 87, 88, 89, 90, 91,		/* P50-P56 */
> +	92, 93, 94, 95, 96, 97, 98,		/* P60-P66 */
> +	99, 100, 101, 102, 103, 104, 105, 106,	/* P70-P77 */

Please format it so it looks like a table:

	 83,  84,				/* P20-P21 */
	  7,   8,   9,  10,  11,  12,  13,	/* P30-P36 */
	 85,  86,  87,  88,  89,  90,  91,	/* P50-P56 */
	 92,  93,  94,  95,  96,  97,  98,	/* P60-P66 */
	 99, 100, 101, 102, 103, 104, 105, 106,	/* P70-P77 */

That's makes it easy to read and to identify the number of entries for a
particular port. The condensed format does not. No?

Thanks,

        tglx

  reply	other threads:[~2026-02-06 11:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06 11:16 [PATCH v3 0/9] Add RZ/G3L IRQC support Biju
2026-02-06 11:16 ` [PATCH v3 1/9] dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Use pattern for interrupt-names Biju
2026-02-07 10:33   ` Krzysztof Kozlowski
2026-02-07 11:19     ` Biju Das
2026-02-06 11:16 ` [PATCH v3 2/9] dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/G3L SoC Biju
2026-02-07 10:35   ` Krzysztof Kozlowski
2026-02-07 11:24     ` Biju Das
2026-02-06 11:16 ` [PATCH v3 3/9] irqchip/renesas-rzg2l: Make fwspec variable as pointer in struct rzg2l_irqc_priv Biju
2026-02-06 11:42   ` Thomas Gleixner
2026-02-24 13:46     ` Biju Das
2026-02-06 11:16 ` [PATCH v3 4/9] irqchip/renesas-rzg2l: Drop IRQC_NUM_IRQ macro Biju
2026-02-06 11:50   ` Thomas Gleixner
2026-02-24 13:49     ` Biju Das
2026-02-06 11:16 ` [PATCH v3 5/9] irqchip/renesas-rzg2l: Drop IRQC_TINT_START macro Biju
2026-02-06 11:16 ` [PATCH v3 6/9] irqchip/renesas-rzg2l: Drop IRQC_IRQ_COUNT macro Biju
2026-02-06 11:16 ` [PATCH v3 7/9] irqchip/renesas-rzg2l: Add RZ/G3L support Biju
2026-02-06 11:58   ` Thomas Gleixner [this message]
2026-02-24 13:50     ` Biju Das
2026-02-06 11:16 ` [PATCH v3 8/9] irqchip/renesas-rzg2l: Add shared irq support Biju
2026-02-06 11:16 ` [PATCH v3 9/9] arm64: dts: renesas: r9a08g046: Add ICU node Biju
2026-02-06 11:37 ` [PATCH v3 0/9] Add RZ/G3L IRQC support Thomas Gleixner
2026-02-06 11:49   ` Biju Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874inu13tl.ffs@tglx \
    --to=tglx@kernel.org \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox