lkml.org 
[lkml]   [2021]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] soc: ti: smartreflex: Use platform_get_irq_optional() to get the interrupt
Hi Andy,

Thank you for the review.

On Sat, Dec 25, 2021 at 4:56 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Sat, Dec 25, 2021 at 4:08 AM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> >
> > platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> > allocation of IRQ resources in DT core code, this causes an issue
> > when using hierarchical interrupt domains using "interrupts" property
> > in the node as this bypasses the hierarchical setup and messes up the
> > irq chaining.
> >
> > In preparation for removal of static setup of IRQ resource from DT core
> > code use platform_get_irq_optional().
>
> ...
>
> > + ret = platform_get_irq_optional(pdev, 0);
> > + if (ret < 0 && ret != -ENXIO) {
>
> > + dev_err(&pdev->dev, "%s: failed to get IRQ resource\n", __func__);
> > + return ret;
>
> Almost fine, but you should exclude this from the deferred probe, so switch to
>
> return dev_err_probe(...);
>
Agreed.

> > + }
> > + if (ret > 0)
> > + sr_info->irq = ret;
>
> ...
>
> > + ret = 0;
>
> I do not see the context, is it really necessary?
>
Yes the change is necessary as the probe callback returns ret on
success, and in the below code flow there might be a case where ret
inst set. So setting the ret here.

Cheers,
Prabhakar

\
 
 \ /
  Last update: 2021-12-25 18:11    [W:0.220 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site