Devicetree
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Maulik Shah <maulik.shah@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Linus Walleij <linusw@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	Sneh Mankad <sneh.mankad@oss.qualcomm.com>,
	Maulik Shah <maulik.shah@oss.qualcomm.com>
Subject: Re: [PATCH v2 2/8] irqchip/qcom-pdc: Move all statics to struct pdc_desc
Date: Wed, 03 Jun 2026 17:24:34 +0200	[thread overview]
Message-ID: <87bjdr7ikt.ffs@fw13> (raw)
In-Reply-To: <20260526-hamoa_pdc-v2-2-f6857af1ce91@oss.qualcomm.com>

On Tue, May 26 2026 at 16:24, Maulik Shah wrote:
> @@ -221,9 +231,9 @@ static void pdc_enable_intr(struct irq_data *d, bool on)
>  {
>  	unsigned long flags;
>  
> -	raw_spin_lock_irqsave(&pdc_lock, flags);
> -	__pdc_enable_intr(d->hwirq, on);
> -	raw_spin_unlock_irqrestore(&pdc_lock, flags);
> +	raw_spin_lock_irqsave(&pdc->lock, flags);

While at it please convert this to:

      guard(raw_spinlock_irqsave)(...);

The _irqsave is not really required when invoked from the irqchip
callbacks with irq desc lock held and interrupts disabled, but that's
also magically invoked from other contexts. So you could spare that
irqsave by wrapping the other callsite into:

        guard(irq)() or scoped_guard(irq)

> +	pdc->enable_intr(d->hwirq, on);
> +	raw_spin_unlock_irqrestore(&pdc->lock, flags);
>  }
>  
>  static void qcom_pdc_gic_disable(struct irq_data *d)
> @@ -348,10 +358,10 @@ static struct pdc_pin_region *get_pin_region(int pin)
>  {
>  	int i;
>  
> -	for (i = 0; i < pdc_region_cnt; i++) {
> -		if (pin >= pdc_region[i].pin_base &&
> -		    pin < pdc_region[i].pin_base + pdc_region[i].cnt)
> -			return &pdc_region[i];
> +	for (i = 0; i < pdc->region_cnt; i++) {

for (int i = 0; ....

> +		if (pin >= pdc->region[i].pin_base &&
> +		    pin < pdc->region[i].pin_base + pdc->region[i].cnt)
> +			return &pdc->region[i];
>  
> +	raw_spin_lock_init(&pdc->lock);
> +
>  	pdc_domain = irq_domain_create_hierarchy(parent_domain,
>  					IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP,
>  					PDC_MAX_IRQS,

Please fix up the coding style here according to

https://docs.kernel.org/process/maintainer-tip.html

  reply	other threads:[~2026-06-03 15:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 10:54 [PATCH v2 0/8] x1e80100: Enable PDC wake GPIOs and deepest idle state Maulik Shah
2026-05-26 10:54 ` [PATCH v2 1/8] irqchip/qcom-pdc: restructure version support Maulik Shah
2026-06-03 15:33   ` Thomas Gleixner
2026-05-26 10:54 ` [PATCH v2 2/8] irqchip/qcom-pdc: Move all statics to struct pdc_desc Maulik Shah
2026-06-03 15:24   ` Thomas Gleixner [this message]
2026-05-26 10:54 ` [PATCH v2 3/8] irqchip/qcom-pdc: Remove pdc_enable_intr() wrapper Maulik Shah
2026-05-26 12:34   ` Stephan Gerhold
2026-06-03 15:25   ` Thomas Gleixner
2026-05-26 10:54 ` [PATCH v2 4/8] irqchip/qcom-pdc: Differentiate between direct SPI and GPIO as SPI Maulik Shah
2026-06-03 15:27   ` Thomas Gleixner
2026-05-26 10:54 ` [PATCH v2 5/8] irqchip/qcom-pdc: Configure PDC to pass through mode Maulik Shah
2026-05-26 12:22   ` Stephan Gerhold
2026-06-03 15:36   ` Thomas Gleixner
2026-05-26 10:54 ` [PATCH v2 6/8] pinctrl: qcom: Acknowledge IRQs for PDC interrupt controller Maulik Shah
2026-05-26 10:54 ` [PATCH v2 7/8] Revert "pinctrl: qcom: x1e80100: Bypass PDC wakeup parent for now" Maulik Shah
2026-05-26 10:54 ` [PATCH v2 8/8] arm64: dts: qcom: x1e80100: Add deepest idle state Maulik Shah
2026-05-26 11:59 ` [PATCH v2 0/8] x1e80100: Enable PDC wake GPIOs and " Stephan Gerhold

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=87bjdr7ikt.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maulik.shah@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sneh.mankad@oss.qualcomm.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