All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Wang <sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [bug report] pinctrl: mediatek: add eint support to MT8183 pinctrl driver
Date: Fri, 21 Sep 2018 10:16:04 +0800	[thread overview]
Message-ID: <1537496164.9654.7.camel@mtkswgap22> (raw)
In-Reply-To: <20180920195338.GA31947@mwanda>

Hi,

On Thu, 2018-09-20 at 22:53 +0300, Dan Carpenter wrote:
> 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?

yup, it should be U16_MAX instead. I'll have a fixup later on. Really thanks for the catchup.

> 
>    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
> 
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

      reply	other threads:[~2018-09-21  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 19:53 [bug report] pinctrl: mediatek: add eint support to MT8183 pinctrl driver Dan Carpenter
2018-09-21  2:16 ` Sean Wang [this message]

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=1537496164.9654.7.camel@mtkswgap22 \
    --to=sean.wang-nus5lvnupcjwk0htik3j/w@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.