linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: mika.westerberg@linux.intel.com
Cc: linux-gpio@vger.kernel.org
Subject: re: gpio / ACPI: Add support for ACPI GPIO operation regions
Date: Fri, 28 Mar 2014 11:37:32 +0300	[thread overview]
Message-ID: <20140328083732.GP25192@mwanda> (raw)

Hello Mika Westerberg,

The patch 473ed7be0da0: "gpio / ACPI: Add support for ACPI GPIO
operation regions" from Mar 14, 2014, leads to the following static
checker warning:

	drivers/gpio/gpiolib-acpi.c:454 acpi_gpio_adr_space_handler()
	warn: should 'gpiod_get_raw_value(desc) << i' be a 64 bit type?

drivers/gpio/gpiolib-acpi.c
   451                  if (function == ACPI_WRITE)
   452                          gpiod_set_raw_value(desc, !!((1 << i) & *value));
   453                  else
   454                          *value |= gpiod_get_raw_value(desc) << i;
   455          }

"value" is u64 pointer but gpiod_get_raw_value() is an int so this could
lead to wrapping bugs.

regards,
dan carpenter

             reply	other threads:[~2014-03-28  8:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  8:37 Dan Carpenter [this message]
2014-03-31 12:05 ` gpio / ACPI: Add support for ACPI GPIO operation regions Mika Westerberg
2014-03-31 12:11   ` Dan Carpenter
2014-03-31 13:45     ` Mika Westerberg
2014-03-31 13:51       ` Dan Carpenter
2014-03-31 14:04         ` Mika Westerberg

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=20140328083732.GP25192@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).