Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-10 Thread Andreas Klinger
> On Fri, Apr 7, 2017 at 12:27 PM, Andreas Klinger wrote: > > Hi Matt, > > > > i've extracted the error condition in a small userspace application for > > demonstration. Just compile and see that in this case the variable H3 is > > zero > > but the whole term evaluates

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-10 Thread Andreas Klinger
> On Fri, Apr 7, 2017 at 12:27 PM, Andreas Klinger wrote: > > Hi Matt, > > > > i've extracted the error condition in a small userspace application for > > demonstration. Just compile and see that in this case the variable H3 is > > zero > > but the whole term evaluates differently if treated as

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-08 Thread Matt Ranostay
On Fri, Apr 7, 2017 at 12:27 PM, Andreas Klinger wrote: > Hi Matt, > > i've extracted the error condition in a small userspace application for > demonstration. Just compile and see that in this case the variable H3 is zero > but the whole term evaluates differently if treated

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-08 Thread Matt Ranostay
On Fri, Apr 7, 2017 at 12:27 PM, Andreas Klinger wrote: > Hi Matt, > > i've extracted the error condition in a small userspace application for > demonstration. Just compile and see that in this case the variable H3 is zero > but the whole term evaluates differently if treated as unsigned or

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-07 Thread Andreas Klinger
Hi Matt, i've extracted the error condition in a small userspace application for demonstration. Just compile and see that in this case the variable H3 is zero but the whole term evaluates differently if treated as unsigned or signed. The whole example including the values of the variables are

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-07 Thread Andreas Klinger
Hi Matt, i've extracted the error condition in a small userspace application for demonstration. Just compile and see that in this case the variable H3 is zero but the whole term evaluates differently if treated as unsigned or signed. The whole example including the values of the variables are

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-07 Thread Matt Ranostay
On Mon, Apr 3, 2017 at 11:16 PM, Matt Ranostay wrote: > On Sun, Apr 2, 2017 at 10:29 AM, Andreas Klinger wrote: >> Linus Walleij schrieb am Sun, 02. Apr 16:56: >>> On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-07 Thread Matt Ranostay
On Mon, Apr 3, 2017 at 11:16 PM, Matt Ranostay wrote: > On Sun, Apr 2, 2017 at 10:29 AM, Andreas Klinger wrote: >> Linus Walleij schrieb am Sun, 02. Apr 16:56: >>> On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron wrote: >>> > On 27/03/17 11:06, Andreas Klinger wrote: >>> >> While calculating

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-04 Thread Matt Ranostay
On Sun, Apr 2, 2017 at 10:29 AM, Andreas Klinger wrote: > Linus Walleij schrieb am Sun, 02. Apr 16:56: >> On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron wrote: >> > On 27/03/17 11:06, Andreas Klinger wrote: >> >> While

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-04 Thread Matt Ranostay
On Sun, Apr 2, 2017 at 10:29 AM, Andreas Klinger wrote: > Linus Walleij schrieb am Sun, 02. Apr 16:56: >> On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron wrote: >> > On 27/03/17 11:06, Andreas Klinger wrote: >> >> While calculating the compensation of the humidity there are negative >> >>

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Jonathan Cameron
On 2 April 2017 18:29:49 BST, Andreas Klinger wrote: >Linus Walleij schrieb am Sun, 02. Apr 16:56: >> On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron >wrote: >> > On 27/03/17 11:06, Andreas Klinger wrote: >> >> While

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Jonathan Cameron
On 2 April 2017 18:29:49 BST, Andreas Klinger wrote: >Linus Walleij schrieb am Sun, 02. Apr 16:56: >> On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron >wrote: >> > On 27/03/17 11:06, Andreas Klinger wrote: >> >> While calculating the compensation of the humidity there are >negative >> >>

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Andreas Klinger
Linus Walleij schrieb am Sun, 02. Apr 16:56: > On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron wrote: > > On 27/03/17 11:06, Andreas Klinger wrote: > >> While calculating the compensation of the humidity there are negative > >> values interpreted as

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Andreas Klinger
Linus Walleij schrieb am Sun, 02. Apr 16:56: > On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron wrote: > > On 27/03/17 11:06, Andreas Klinger wrote: > >> While calculating the compensation of the humidity there are negative > >> values interpreted as unsigned because of unsigned variables used.

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Linus Walleij
On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron wrote: > On 27/03/17 11:06, Andreas Klinger wrote: >> While calculating the compensation of the humidity there are negative >> values interpreted as unsigned because of unsigned variables used. >> These values need to be casted

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Linus Walleij
On Sun, Apr 2, 2017 at 11:32 AM, Jonathan Cameron wrote: > On 27/03/17 11:06, Andreas Klinger wrote: >> While calculating the compensation of the humidity there are negative >> values interpreted as unsigned because of unsigned variables used. >> These values need to be casted to signed as

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Jonathan Cameron
On 27/03/17 11:06, Andreas Klinger wrote: > While calculating the compensation of the humidity there are negative > values interpreted as unsigned because of unsigned variables used. > These values need to be casted to signed as indicated by the documentation > of the sensor. > > Signed-off-by:

Re: [PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-04-02 Thread Jonathan Cameron
On 27/03/17 11:06, Andreas Klinger wrote: > While calculating the compensation of the humidity there are negative > values interpreted as unsigned because of unsigned variables used. > These values need to be casted to signed as indicated by the documentation > of the sensor. > > Signed-off-by:

[PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-03-27 Thread Andreas Klinger
While calculating the compensation of the humidity there are negative values interpreted as unsigned because of unsigned variables used. These values need to be casted to signed as indicated by the documentation of the sensor. Signed-off-by: Andreas Klinger ---

[PATCH] IIO: bmp280-core.c: fix error in humidity calculation

2017-03-27 Thread Andreas Klinger
While calculating the compensation of the humidity there are negative values interpreted as unsigned because of unsigned variables used. These values need to be casted to signed as indicated by the documentation of the sensor. Signed-off-by: Andreas Klinger ---