From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] iio: hid-sensors: typo leads to potential forever loop
Date: Fri, 09 May 2014 16:55:56 +0000 [thread overview]
Message-ID: <536D089C.9040307@linux.intel.com> (raw)
In-Reply-To: <20140509115617.GC32027@mwanda>
OOPs. Good catch.
Thanks,
Srinivas
On 05/09/2014 04:56 AM, Dan Carpenter wrote:
> The "i < " was missing in this condition.
>
> Fixes: 5d02edfc3957 ('iio: hid-sensors: Convert units and exponent')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> index 3729646..3052eb1 100644
> --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> +++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> @@ -327,7 +327,7 @@ int hid_sensor_format_scale(u32 usage_id,
> *val0 = 1;
> *val1 = 0;
>
> - for (i = 0; ARRAY_SIZE(unit_conversion); ++i) {
> + for (i = 0; i < ARRAY_SIZE(unit_conversion); ++i) {
> if (unit_conversion[i].usage_id = usage_id &&
> unit_conversion[i].unit = attr_info->units) {
> exp = hid_sensor_convert_exponent(
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] iio: hid-sensors: typo leads to potential forever loop
Date: Fri, 09 May 2014 09:55:56 -0700 [thread overview]
Message-ID: <536D089C.9040307@linux.intel.com> (raw)
In-Reply-To: <20140509115617.GC32027@mwanda>
OOPs. Good catch.
Thanks,
Srinivas
On 05/09/2014 04:56 AM, Dan Carpenter wrote:
> The "i < " was missing in this condition.
>
> Fixes: 5d02edfc3957 ('iio: hid-sensors: Convert units and exponent')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> index 3729646..3052eb1 100644
> --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> +++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> @@ -327,7 +327,7 @@ int hid_sensor_format_scale(u32 usage_id,
> *val0 = 1;
> *val1 = 0;
>
> - for (i = 0; ARRAY_SIZE(unit_conversion); ++i) {
> + for (i = 0; i < ARRAY_SIZE(unit_conversion); ++i) {
> if (unit_conversion[i].usage_id == usage_id &&
> unit_conversion[i].unit == attr_info->units) {
> exp = hid_sensor_convert_exponent(
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2014-05-09 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 11:56 [patch] iio: hid-sensors: typo leads to potential forever loop Dan Carpenter
2014-05-09 11:56 ` Dan Carpenter
2014-05-09 16:55 ` Srinivas Pandruvada [this message]
2014-05-09 16:55 ` Srinivas Pandruvada
2014-05-10 10:38 ` Jonathan Cameron
2014-05-10 10:38 ` Jonathan Cameron
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=536D089C.9040307@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-iio@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.