gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()
Hello Andy Shevchenko,
The patch d3054ba1db62: "gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()" from Jul 19, 2022, leads to the following Smatch static checker warning:
drivers/gpio/gpio-74xx-mmio.c:92 mmio_74xx_dir_in() warn: bitwise AND condition is false here
drivers/gpio/gpio-74xx-mmio.c
88 static int mmio_74xx_dir_in(struct gpio_chip *gc, unsigned int gpio)
89 {
90 struct mmio_74xx_gpio_priv *priv = gpiochip_get_data(gc);
91 --> 92 if (priv->flags & MMIO_74XX_DIR_IN)
MMIO_74XX_DIR_IN is zero so this can never be true.
93 return 0;
94
95 return -ENOTSUPP;
96 }regards,
dan carpenter