lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9fb01a9-362a-4540-9547-63263a4ca10e@email.android.com>
Date:	Mon, 16 Apr 2012 17:08:07 +0100
From:	Jonathan Cameron <jic23@....ac.uk>
To:	Laxman Dewangan <ldewangan@...dia.com>, gregkh@...uxfoundation.org,
	linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: iio: light: isl29028: fix correct mask value



Laxman Dewangan <ldewangan@...dia.com> wrote:

>The mask value in the read_raw/write_raw is absolute
>value, not the bit position value.
>Fixing this in the implemented function to check value,
>not with the bit position value.
Oops I should have caught that.
Sorry 
>
>Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
Acked-by: <jic23@...nel.org>
>---
>Somehow this was missed on my testing.
>I tested today again with linux next and found this issue.
>
> drivers/staging/iio/light/isl29028.c |    8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/staging/iio/light/isl29028.c
>b/drivers/staging/iio/light/isl29028.c
>index e705e45..4e6ac24 100644
>--- a/drivers/staging/iio/light/isl29028.c
>+++ b/drivers/staging/iio/light/isl29028.c
>@@ -272,7 +272,7 @@ static int isl29028_write_raw(struct iio_dev
>*indio_dev,
> 	mutex_lock(&chip->lock);
> 	switch (chan->type) {
> 	case IIO_PROXIMITY:
>-		if (mask != IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT) {
>+		if (mask != IIO_CHAN_INFO_SAMP_FREQ) {
> 			dev_err(chip->dev,
> 				"proximity: mask value 0x%08lx not supported\n",
> 				mask);
>@@ -294,7 +294,7 @@ static int isl29028_write_raw(struct iio_dev
>*indio_dev,
> 		break;
> 
> 	case IIO_LIGHT:
>-		if (mask != IIO_CHAN_INFO_SCALE_SEPARATE_BIT) {
>+		if (mask != IIO_CHAN_INFO_SCALE) {
> 			dev_err(chip->dev,
> 				"light: mask value 0x%08lx not supported\n",
> 				mask);
>@@ -349,14 +349,14 @@ static int isl29028_read_raw(struct iio_dev
>*indio_dev,
> 		ret = IIO_VAL_INT;
> 		break;
> 
>-	case IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT:
>+	case IIO_CHAN_INFO_SAMP_FREQ:
> 		if (chan->type != IIO_PROXIMITY)
> 			break;
> 		*val = chip->prox_sampling;
> 		ret = IIO_VAL_INT;
> 		break;
> 
>-	case IIO_CHAN_INFO_SCALE_SEPARATE_BIT:
>+	case IIO_CHAN_INFO_SCALE:
> 		if (chan->type != IIO_LIGHT)
> 			break;
> 		*val = chip->lux_scale;
>-- 
>1.7.1.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo@...r.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ