lkml.org 
[lkml]   [2022]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 5/7] gpio: gpiolib: Add a check to validate GPIO hwirq
Hi Andy,

Thank you for the review.

On Wed, May 18, 2022 at 10:08 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Wed, May 18, 2022 at 9:30 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> 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

\
 
 \ /
  Last update: 2022-05-19 06:12    [W:0.060 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site