[bug report] gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()

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

 



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



[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