From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-gpio@vger.kernel.org
Subject: Re: gpio / ACPI: Add support for ACPI GPIO operation regions
Date: Mon, 31 Mar 2014 16:45:57 +0300 [thread overview]
Message-ID: <20140331134557.GI19349@intel.com> (raw)
In-Reply-To: <20140331121037.GA18506@mwanda>
On Mon, Mar 31, 2014 at 03:11:33PM +0300, Dan Carpenter wrote:
> On Mon, Mar 31, 2014 at 03:05:25PM +0300, Mika Westerberg wrote:
> > On Fri, Mar 28, 2014 at 11:37:32AM +0300, Dan Carpenter wrote:
> > > 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?
> >
> > Thanks for the report. However, I'm not able to reproduce this warning with
> > sparse. How did you get this?
>
> It's not a Sparse warning. It's some unreleased stuff (too many false
> positives). I sort through the warnings manually and send the ones
> which seem valid.
I see.
What do you think about the patch below? I have to admit that this kind of
stuff is in my "gray" area of understanding.
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index d5be56fe689e..401add28933f 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -451,7 +451,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
if (function == ACPI_WRITE)
gpiod_set_raw_value(desc, !!((1 << i) & *value));
else
- *value |= gpiod_get_raw_value(desc) << i;
+ *value |= (u64)gpiod_get_raw_value(desc) << i;
}
out:
next prev parent reply other threads:[~2014-03-31 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 8:37 gpio / ACPI: Add support for ACPI GPIO operation regions Dan Carpenter
2014-03-31 12:05 ` Mika Westerberg
2014-03-31 12:11 ` Dan Carpenter
2014-03-31 13:45 ` Mika Westerberg [this message]
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=20140331134557.GI19349@intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=dan.carpenter@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.