Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: andriy.shevchenko@linux.intel.com
Cc: linux-gpio@vger.kernel.org
Subject: [bug report] gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()
Date: Thu, 21 Jul 2022 17:33:38 +0300	[thread overview]
Message-ID: <YtljwoAB8nrm7+zs@kili> (raw)

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

                 reply	other threads:[~2022-07-21 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=YtljwoAB8nrm7+zs@kili \
    --to=dan.carpenter@oracle.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-gpio@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox