Re: [PATCH 1/4] pinctrl: mediatek: fix static checker warning caused by EINT_NA

From: Linus Walleij
Date: Fri Sep 21 2018 - 12:11:56 EST


On Thu, Sep 20, 2018 at 9:07 PM <sean.wang@xxxxxxxxxxxx> wrote:

> From: Sean Wang <sean.wang@xxxxxxxxxxxx>
>
> EINT_NA is an u16 number, so it should be U16_MAX instead of -1
> to fix up drivers/pinctrl/mediatek/pinctrl-paris.c:732 mtk_gpio_to_irq()
> warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1))
>
> Also happens in
> drivers/pinctrl/mediatek/pinctrl-paris.c:749 mtk_gpio_set_config()
> warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1))
>
> drivers/pinctrl/mediatek/pinctrl-moore.c:479 mtk_gpio_to_irq()
> warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1))
>
> drivers/pinctrl/mediatek/pinctrl-moore.c:496 mtk_gpio_set_config()
> warn: impossible condition '(desc->eint.eint_n == -1) => (0-u16max == (-1))
>
> Fixes: 6561859b067f ("pinctrl: mediatek: add eint support to MT8183 pinctrl driver")
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>

Patch applied.

Yours,
Linus Walleij