Re: [PATCH v3 03/10] ata: pata_of_platform: Use platform_get_irq_optional() to get the interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 25, 2021 at 3:55 AM Lad Prabhakar
<prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> 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().

...

> +       irq = platform_get_irq_optional(ofdev, 0);
> +       if (irq < 0 && irq != -ENXIO)
> +               return irq;
> +
> +       if (irq > 0) {

> +               memset(&irq_res, 0x0, sizeof(struct resource));

Why do you need that variable at all?

0x0 -> 0
sizeof(irq_res)

> +               irq_res.start = irq;
> +       }

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux