[bug report] pinctrl: mediatek: add eint support to MT8183 pinctrl driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux