* [bug report] gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()
@ 2022-07-21 14:33 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-07-21 14:33 UTC (permalink / raw)
To: andriy.shevchenko; +Cc: linux-gpio
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-21 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 14:33 [bug report] gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox