summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2018-09-21 07:07:35 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-09-21 19:11:12 +0300
commit7f2e29e133ea981d90fb6ee8f5fadf8b0e2bb366 (patch)
tree2f84ebb7011be95e250aae3b988ec1d6d6a02694 /drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
parent068cfb9a0fd908747f29d048719f254e21b9dad5 (diff)
downloadlinux-7f2e29e133ea981d90fb6ee8f5fadf8b0e2bb366.tar.xz
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/pinctrl-mtk-common-v2.h')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h2
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) { \