Re: [RFC PATCH 2/3] gpio: ep93xx: drop to_irq binding

From: Linus Walleij
Date: Sun Dec 27 2020 - 16:22:20 EST


On Thu, Dec 24, 2020 at 12:22 PM Nikita Shubin
<nikita.shubin@xxxxxxxxxxx> wrote:

> As ->to_irq is redefined in gpiochip_add_irqchip, having it defined in
> driver is useless, so let's drop it.
>
> Also i think it is worth to give a gentle warning in
> gpiochip_add_irqchip, to prevent people relying on to_irq.
>
> For example
>
> WARN_ON_ONCE(gc->to_irq,
> "to_irq is redefined in gpiochip_add_irqchip" \
> "and you shouldn't rely on it\n");
>
> Signed-off-by: Nikita Shubin <nikita.shubin@xxxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Take out the suggestion in the commit message and implement it,
but I think WARN_ON is too nasty, just use dev_err().

Yours,
Linus Walleij