Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753851AbdDKHqf (ORCPT ); Tue, 11 Apr 2017 03:46:35 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:35612 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752697AbdDKHp6 (ORCPT ); Tue, 11 Apr 2017 03:45:58 -0400 MIME-Version: 1.0 In-Reply-To: <20170410170001.GA2524@project> References: <20170410170001.GA2524@project> From: Linus Walleij Date: Tue, 11 Apr 2017 09:45:56 +0200 Message-ID: Subject: Re: [PATCH v2] IIO: bmp280-core.c: fix error in humidity calculation To: Andreas Klinger Cc: Jonathan Cameron , Matt Ranostay , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Vlad Dogaru , Akinobu Mita , Wei Yongjun , Aniroop Mathur , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 699 Lines: 19 On Mon, Apr 10, 2017 at 7:00 PM, Andreas Klinger wrote: > While calculating the compensation of the humidity there are negative values > interpreted as unsigned because of unsigned variables used. These values as > well as the constants need to be casted to signed as indicated by the > documentation of the sensor. > > Changes in v2: > - cast also constants to signed; otherwise calculation is not correct > > I removed the Acked-By of Linus Walleij because of another change in the > calculation. Don't know how it should be treated. Acked-by: Linus Walleij You guys do an awesome job at maintaining the sensor code, thanks. Yours, Linus Walleij