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 17:04:12 +0300 [thread overview]
Message-ID: <20140331140412.GK19349@intel.com> (raw)
In-Reply-To: <20140331135124.GB18506@mwanda>
On Mon, Mar 31, 2014 at 04:51:24PM +0300, Dan Carpenter wrote:
> On Mon, Mar 31, 2014 at 04:45:57PM +0300, Mika Westerberg wrote:
> > 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.
>
> It looks good to me. The question, I guess is can pin_table_length ever
> be more than 31. gpiod_get_raw_value() returns and int of 0-1 so
> if "i" is 31 then *value is an unexpected number because the shift is
> undefined (it wraps around in GCC).
It can be larger than 31 so I guess I'll submit this patch to LinusW.
prev parent reply other threads:[~2014-03-31 13:56 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
2014-03-31 13:51 ` Dan Carpenter
2014-03-31 14:04 ` Mika Westerberg [this message]
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=20140331140412.GK19349@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 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).