From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [bug report] pinctrl: mediatek: add eint support to MT8183 pinctrl driver
Date: Thu, 20 Sep 2018 22:53:38 +0300 [thread overview]
Message-ID: <20180920195338.GA31947@mwanda> (raw)
Hello Sean Wang,
The patch 6561859b067f: "pinctrl: mediatek: add eint support to
MT8183 pinctrl driver" from Sep 8, 2018, leads to the following
static checker warning:
drivers/pinctrl/mediatek/pinctrl-paris.c:732 mtk_gpio_to_irq()
warn: impossible condition '(desc->eint.eint_n == -1) => (0-u16max == (-1))'
drivers/pinctrl/mediatek/pinctrl-paris.c
722 static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
723 {
724 struct mtk_pinctrl *hw = gpiochip_get_data(chip);
725 const struct mtk_pin_desc *desc;
726
727 if (!hw->eint)
728 return -ENOTSUPP;
729
730 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset];
731
732 if (desc->eint.eint_n == EINT_NA)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Do you want to define EINT_NA as 0xffff maybe?
733 return -ENOTSUPP;
734
735 return mtk_eint_find_irq(hw->eint, desc->eint.eint_n);
736 }
See also:
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))'
regards,
dan carpenter
next reply other threads:[~2018-09-20 19:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 19:53 Dan Carpenter [this message]
2018-09-21 2:16 ` [bug report] pinctrl: mediatek: add eint support to MT8183 pinctrl driver Sean Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180920195338.GA31947@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).