linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Dawei Li <dawei.li@shingroup.cn>
Cc: tglx@linutronix.de, sdonthineni@nvidia.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, set_pte_at@outlook.com
Subject: Re: [PATCH 2/4] irqchip/gic: Implement generic gic_irq() API for GIC & GIC-v3
Date: Thu, 18 Jan 2024 14:03:08 +0000	[thread overview]
Message-ID: <87zfx2wxgj.wl-maz@kernel.org> (raw)
In-Reply-To: <20240118112739.2000497-3-dawei.li@shingroup.cn>

On Thu, 18 Jan 2024 11:27:37 +0000,
Dawei Li <dawei.li@shingroup.cn> wrote:
> 
> GIC & GIC-v3 share same gic_irq() implementations, unify them into a
> generic API.
> 
> Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
> ---
>  drivers/irqchip/irq-gic-common.h | 5 +++++
>  drivers/irqchip/irq-gic-v3.c     | 5 -----
>  drivers/irqchip/irq-gic.c        | 5 -----
>  3 files changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-gic-common.h b/drivers/irqchip/irq-gic-common.h
> index f407cce9ecaa..ed18db4ab2c5 100644
> --- a/drivers/irqchip/irq-gic-common.h
> +++ b/drivers/irqchip/irq-gic-common.h
> @@ -19,6 +19,11 @@ struct gic_quirk {
>  	u32 mask;
>  };
>  
> +static inline unsigned int gic_irq(struct irq_data *d)
> +{
> +	return d->hwirq;
> +}
> +
>  int gic_configure_irq(unsigned int irq, unsigned int type,
>                         void __iomem *base, void (*sync_access)(void));
>  void gic_dist_config(void __iomem *base, int gic_irqs,
> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
> index b9d9375a3434..474a498a521e 100644
> --- a/drivers/irqchip/irq-gic-v3.c
> +++ b/drivers/irqchip/irq-gic-v3.c
> @@ -181,11 +181,6 @@ static enum gic_intid_range get_intid_range(struct irq_data *d)
>  	return __get_intid_range(d->hwirq);
>  }
>  
> -static inline unsigned int gic_irq(struct irq_data *d)
> -{
> -	return d->hwirq;
> -}
> -

I'd rather not do that. If anything, I'd get rid of the helper
altogether, as we have irqd_to_hwirq() that does the same job, and
actually preserves the typing.

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-01-18 14:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 11:27 [PATCH 0/4] Minor cleanup on gic(v3) and genirq Dawei Li
2024-01-18 11:27 ` [PATCH 1/4] irqchip/gic-v3: Implement read polling with dedicated API Dawei Li
2024-01-18 14:00   ` Marc Zyngier
2024-01-19  1:49     ` Dawei Li
2024-01-18 11:27 ` [PATCH 2/4] irqchip/gic: Implement generic gic_irq() API for GIC & GIC-v3 Dawei Li
2024-01-18 14:03   ` Marc Zyngier [this message]
2024-01-19  2:02     ` Dawei Li
2024-01-18 11:27 ` [PATCH 3/4] genirq: Remove unneeded forward declaration Dawei Li
2024-01-18 11:27 ` [PATCH 4/4] genirq: Initialize resend_node hlist for all irq_desc Dawei Li
2024-01-18 14:09   ` Marc Zyngier

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=87zfx2wxgj.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=dawei.li@shingroup.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdonthineni@nvidia.com \
    --cc=set_pte_at@outlook.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).