linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: health: max30100: fixed parenthesis around FIFO count check
@ 2017-01-17  2:04 Matt Ranostay
  2017-01-21 14:18 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Ranostay @ 2017-01-17  2:04 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, Matt Ranostay

FIFO was being read every sample after the "almost full" state was
reached. This was due to an incorrect placement of the parenthesis
in the while condition check.

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
---
 drivers/iio/health/max30100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
index 90ab8a2d2846..183c14329d6e 100644
--- a/drivers/iio/health/max30100.c
+++ b/drivers/iio/health/max30100.c
@@ -238,7 +238,7 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)
 
 	mutex_lock(&data->lock);
 
-	while (cnt || (cnt = max30100_fifo_count(data) > 0)) {
+	while (cnt || (cnt = max30100_fifo_count(data)) > 0) {
 		ret = max30100_read_measurement(data);
 		if (ret)
 			break;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: health: max30100: fixed parenthesis around FIFO count check
  2017-01-17  2:04 [PATCH] iio: health: max30100: fixed parenthesis around FIFO count check Matt Ranostay
@ 2017-01-21 14:18 ` Jonathan Cameron
  2017-01-22  4:55   ` Matt Ranostay
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2017-01-21 14:18 UTC (permalink / raw)
  To: Matt Ranostay; +Cc: linux-iio

On 17/01/17 02:04, Matt Ranostay wrote:
> FIFO was being read every sample after the "almost full" state was
> reached. This was due to an incorrect placement of the parenthesis
> in the while condition check.
> 
> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Fixes tags please in future.  I've applied this to the fixes-togreg
branch and marked for stable with a fixes tag of the last patch to
touch that line (which isn't really correct, but a backport would require
that patch anyway in addition to this one).

Jonathan
> ---
>  drivers/iio/health/max30100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
> index 90ab8a2d2846..183c14329d6e 100644
> --- a/drivers/iio/health/max30100.c
> +++ b/drivers/iio/health/max30100.c
> @@ -238,7 +238,7 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)
>  
>  	mutex_lock(&data->lock);
>  
> -	while (cnt || (cnt = max30100_fifo_count(data) > 0)) {
> +	while (cnt || (cnt = max30100_fifo_count(data)) > 0) {
>  		ret = max30100_read_measurement(data);
>  		if (ret)
>  			break;
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: health: max30100: fixed parenthesis around FIFO count check
  2017-01-21 14:18 ` Jonathan Cameron
@ 2017-01-22  4:55   ` Matt Ranostay
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Ranostay @ 2017-01-22  4:55 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

On Sat, Jan 21, 2017 at 6:18 AM, Jonathan Cameron <jic23@kernel.org> wrote:
> On 17/01/17 02:04, Matt Ranostay wrote:
>> FIFO was being read every sample after the "almost full" state was
>> reached. This was due to an incorrect placement of the parenthesis
>> in the while condition check.
>>
>> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
> Fixes tags please in future.  I've applied this to the fixes-togreg
> branch and marked for stable with a fixes tag of the last patch to
> touch that line (which isn't really correct, but a backport would require
> that patch anyway in addition to this one).

Oops. Note taken.

>
> Jonathan
>> ---
>>  drivers/iio/health/max30100.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
>> index 90ab8a2d2846..183c14329d6e 100644
>> --- a/drivers/iio/health/max30100.c
>> +++ b/drivers/iio/health/max30100.c
>> @@ -238,7 +238,7 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)
>>
>>       mutex_lock(&data->lock);
>>
>> -     while (cnt || (cnt = max30100_fifo_count(data) > 0)) {
>> +     while (cnt || (cnt = max30100_fifo_count(data)) > 0) {
>>               ret = max30100_read_measurement(data);
>>               if (ret)
>>                       break;
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-22  4:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17  2:04 [PATCH] iio: health: max30100: fixed parenthesis around FIFO count check Matt Ranostay
2017-01-21 14:18 ` Jonathan Cameron
2017-01-22  4:55   ` Matt Ranostay

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).