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]

 



Hi Andy,

Thank you for the review.

On Wed, May 18, 2022 at 10:08 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> 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.
>
Right, I picked up the printf() just a few lines above where it did
the same exact thing. I will update it in the next version.

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

Cheers,
Prabhakar



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux