From: Stephen Warren <swarren@wwwdotorg.org>
To: Tony Prisk <linux@prisktech.co.nz>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org,
vt8500-wm8505-linux-kernel@googlegroups.com, arnd@arndb.de,
olof@lixom.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3 1/6] of: Add support for reading a u32 from a multi-value property.
Date: Mon, 01 Apr 2013 10:49:42 -0600 [thread overview]
Message-ID: <5159BAA6.50706@wwwdotorg.org> (raw)
In-Reply-To: <1364451049-2981-2-git-send-email-linux@prisktech.co.nz>
On 03/28/2013 12:10 AM, Tony Prisk wrote:
> This patch adds an of_property_read_u32_index() function to allow
> reading a single indexed u32 value from a property containing multiple
> u32 values.
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> +int of_property_read_u32_index(const struct device_node *np,
> + if ((index * sizeof(*out_value)) > prop->length)
> + return -EOVERFLOW;
I think that if should be:
if (((index + 1) * sizeof(*out_value)) > prop->length)
since the code should check if the last byte of the u32 is out-of-range,
not whether the first byte is.
Aside from that, this patch,
Reviewed-by: Stephen Warren <swarren@nvidia.com>
next prev parent reply other threads:[~2013-04-01 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 6:10 [PATCHv3 0/6] arm: vt8500: Add support for pinctrl/gpio module Tony Prisk
2013-03-28 6:10 ` [PATCHv3 1/6] of: Add support for reading a u32 from a multi-value property Tony Prisk
2013-04-01 16:49 ` Stephen Warren [this message]
2013-03-28 6:10 ` [PATCHv3 2/6] arm: vt8500: Increase available GPIOs on arch-vt8500 Tony Prisk
2013-03-28 6:10 ` [PATCHv3 3/6] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500 Tony Prisk
2013-04-01 17:06 ` Stephen Warren
2013-04-01 18:59 ` Tony Prisk
2013-04-01 19:02 ` Stephen Warren
2013-03-28 6:10 ` [PATCHv3 4/6] arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver Tony Prisk
2013-03-28 6:10 ` [PATCHv3 5/6] arm: vt8500: Remove gpio devicetree nodes Tony Prisk
2013-03-28 6:10 ` [PATCHv3 6/6] gpio: vt8500: Remove arch-vt8500 gpio driver Tony Prisk
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=5159BAA6.50706@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=arnd@arndb.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@prisktech.co.nz \
--cc=olof@lixom.net \
--cc=vt8500-wm8505-linux-kernel@googlegroups.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