Re: [PATCH v4 5/7] gpio: gpiolib: Add a check to validate GPIO hwirq

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

 



On Wed, May 18, 2022 at 9:30 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> wrote:
>
> Add a check to validate GPIO hwirq is always within the range of hwirq_max
> set in the GPIO irq domain.

...

> +                       if (WARN(hwirq >= domain->hwirq_max,
> +                                "error: hwirq 0x%x is too large for %s\n",
> +                                (int)hwirq, domain->name))

Using castings in the printf() often points to possible mistakes or
missed custom specifiers.

...

> +               if (WARN(hwirq >= domain->hwirq_max,
> +                        "error: hwirq 0x%x is too large for %s\n", (int)hwirq, domain->name))

Ditto.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux