linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] pinctrl: mediatek: fix static checker warning caused by EINT_NA
@ 2018-09-21  4:07 sean.wang
  2018-09-21  4:07 ` [PATCH 2/4] pinctrl: mediatek: add no eint function for pin define sean.wang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: sean.wang @ 2018-09-21  4:07 UTC (permalink / raw)
  To: linus.walleij, linux-mediatek
  Cc: linux-arm-kernel, linux-gpio, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

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>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
index 10d33ec..b618042 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) {		\
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-09-21 16:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-21  4:07 [PATCH 1/4] pinctrl: mediatek: fix static checker warning caused by EINT_NA sean.wang
2018-09-21  4:07 ` [PATCH 2/4] pinctrl: mediatek: add no eint function for pin define sean.wang
2018-09-21 16:12   ` Linus Walleij
2018-09-21  4:07 ` [PATCH 3/4] pinctrl: mediatek: add MT6765 pinctrl driver sean.wang
2018-09-21 16:13   ` Linus Walleij
2018-09-21  4:07 ` [PATCH 4/4] pinctrl: mediatek: add eint support to " sean.wang
2018-09-21 16:14   ` Linus Walleij
2018-09-21 16:11 ` [PATCH 1/4] pinctrl: mediatek: fix static checker warning caused by EINT_NA Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).