diff options
author | Sean Wang <sean.wang@mediatek.com> | 2018-09-21 12:07:35 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-09-21 09:11:12 -0700 |
commit | 7f2e29e133ea981d90fb6ee8f5fadf8b0e2bb366 (patch) | |
tree | 2f84ebb7011be95e250aae3b988ec1d6d6a02694 /drivers/pinctrl/mediatek | |
parent | 068cfb9a0fd908747f29d048719f254e21b9dad5 (diff) | |
download | linux-7f2e29e133ea981d90fb6ee8f5fadf8b0e2bb366.tar.bz2 |
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>
Diffstat (limited to 'drivers/pinctrl/mediatek')
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h index 10d33ecaf456..b618042efac7 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h @@ -18,7 +18,7 @@ #define MTK_PULLDOWN 0 #define MTK_PULLUP 1 -#define EINT_NA -1 +#define EINT_NA U16_MAX #define PIN_FIELD_CALC(_s_pin, _e_pin, _i_base, _s_addr, _x_addrs, \ _s_bit, _x_bits, _sz_reg, _fixed) { \ |