From: Radu Rendec <radu@rendec.net>
To: Andrew Davis <afd@ti.com>, Thomas Gleixner <tglx@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] irqchip/pruss-intc: Use match data directly
Date: Sat, 05 Sep 2026 10:02:08 -0400 [thread overview]
Message-ID: <6716ab989d1b81beefe46f4fd807bd87172c8d65.camel@rendec.net> (raw)
In-Reply-To: <20260903185220.2014861-1-afd@ti.com>
On Thu, 2026-09-03 at 13:52 -0500, Andrew Davis wrote:
> The match data is fetched before the instance data is available, but it is
> not used until after. Skip the temporary variable and fetch the match data
> after it has a place to be stored.
>
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
> drivers/irqchip/irq-pruss-intc.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
> index 81078d56f38dc..cc3a7c21c2904 100644
> --- a/drivers/irqchip/irq-pruss-intc.c
> +++ b/drivers/irqchip/irq-pruss-intc.c
> @@ -516,24 +516,21 @@ static const char * const irq_names[MAX_NUM_HOST_IRQS] = {
>
> static int pruss_intc_probe(struct platform_device *pdev)
> {
> - const struct pruss_intc_match_data *data;
> struct device *dev = &pdev->dev;
> struct pruss_intc *intc;
> struct pruss_host_irq_data *host_data;
> int i, irq, ret;
> u8 max_system_events, irqs_reserved = 0;
>
> - data = of_device_get_match_data(dev);
> - if (!data)
> - return -ENODEV;
> -
> - max_system_events = data->num_system_events;
> -
> intc = devm_kzalloc(dev, sizeof(*intc), GFP_KERNEL);
> if (!intc)
> return -ENOMEM;
>
> - intc->soc_config = data;
> + intc->soc_config = of_device_get_match_data(dev);
> + if (!intc->soc_config)
> + return -ENODEV;
> + max_system_events = intc->soc_config->num_system_events;
> +
> intc->dev = dev;
> platform_set_drvdata(pdev, intc);
>
Reviewed-by: Radu Rendec <radu@rendec.net>
prev parent reply other threads:[~2026-09-05 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 18:52 Andrew Davis
2026-09-03 18:52 ` [PATCH 2/2] irqchip/pruss-intc: Use scoped lock guard and devm_mutex_init Andrew Davis
2026-09-05 16:01 ` Radu Rendec
2026-09-05 14:02 ` Radu Rendec [this message]
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=6716ab989d1b81beefe46f4fd807bd87172c8d65.camel@rendec.net \
--to=radu@rendec.net \
--cc=afd@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@kernel.org \
/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
all inboxes | Powered by JetHome®