]> asedeno.scripts.mit.edu Git - linux.git/commit
pinctrl: mediatek: fix static checker warning caused by EINT_NA
authorSean Wang <sean.wang@mediatek.com>
Fri, 21 Sep 2018 04:07:35 +0000 (12:07 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 21 Sep 2018 16:11:12 +0000 (09:11 -0700)
commit7f2e29e133ea981d90fb6ee8f5fadf8b0e2bb366
tree2f84ebb7011be95e250aae3b988ec1d6d6a02694
parent068cfb9a0fd908747f29d048719f254e21b9dad5
pinctrl: mediatek: fix static checker warning caused by EINT_NA

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@oracle.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h