Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2392758imd; Sun, 28 Oct 2018 09:04:55 -0700 (PDT) X-Google-Smtp-Source: AJdET5cpDKRA9oagNfaVxp6znZHSPpDCDtYoiRnKBGOoQV3vOUHXh4ptXHtaMxw0qtse6UVmBKQq X-Received: by 2002:a63:6848:: with SMTP id d69-v6mr10823897pgc.113.1540742695448; Sun, 28 Oct 2018 09:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540742695; cv=none; d=google.com; s=arc-20160816; b=ewcmiMt61drKY6GrHlWKHxyVWqYsserXsENEesyrKtZJ18c4j+nUY8NHckCOPo57Z1 pZz5e3pDh4U4fG9kO29XC43f0RWG7TLCr7xGY9f94jc+5Riep8v6VM/H5pNPP8YWWtqu Fe47h9g1g6vho2PVJUXmq/DbUJfI1zVBYftA7u91wZceADd5CNJDIlJKYfr37CaQeNqz P520XAzIKTYyFrKhxwaWMAnfLOO+HPniIRnUjozJaL/AZRnaB2loKmyXy6mTYy2FzeBJ Mun1lXLsGAa6IdmvIRcyyZQjbnHWC0WCV8+jqTo+QK1HN+xpMP5/MftYZHwotwewP2cY i8tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=op3G9vfqSSANNe58v3dG8GQV6YL9WYvK4nqTI4Tm1II=; b=D4mNGlObaJXHLhdYNur3wTV+aUIbbqpA9hR4TKVCdbVUCLguK4D9dTVbFfrRql+Hv3 U7vQj/43smAKa4ktTIv0j1nFkNzv1fGZjHzwspp1yllg+r3hLOpOwlju/pi+rm/8hMKx /Omwd7Hh4v5qTdk+yTGQvFSiiKV23yVQYV/Aa/WKmo8JIJD/xNZxXYQhCa4024OZW4x5 /amm6Y1OTc28qIbnlOpB+LHe4flqFl0+/ibPvqlO+vFYY69wCSsMpeTaOd4i6NEFRalR 4+K6td2RXm49u/V88F+0Sjc3iaCzlJ0jx82zlhCn66BEv1SC3/JUdBBr0pfMTt7N+oDo Wy+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OFJs3Qg3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b137-v6si9822831pfb.144.2018.10.28.09.04.39; Sun, 28 Oct 2018 09:04:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OFJs3Qg3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727692AbeJ2AnN (ORCPT + 99 others); Sun, 28 Oct 2018 20:43:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:58898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbeJ2AnM (ORCPT ); Sun, 28 Oct 2018 20:43:12 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9853E20843; Sun, 28 Oct 2018 15:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540742293; bh=GlizhlXbHyOTA60akptwg8UZ73cAKy5W2U3EdHuoUOc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OFJs3Qg31ZlY1yH0DADAXXukCF8EZhLiL3sBFGdQ4uFrAfnD/XXiKPdaLynkvMJ+C H8ijAo7nl2iEWCA7/gOP5YK2JsRGAds04TJhdfEfZzaW1RcMhlHP28aZrfX2ICazTX XlFwP5FrKmwhfwf76qUtRscKRwnooOYfzbq8zgMc= Date: Sun, 28 Oct 2018 15:58:07 +0000 From: Jonathan Cameron To: Renato Lui Geh Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, alexandru.Ardelean@analog.com, stefan.popa@analog.com, giuliano.belinassi@usp.br, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com Subject: Re: [PATCH v2 2/2] staging: iio: ad7780: fix offset read value Message-ID: <20181028155807.4de0f874@archlinux> In-Reply-To: References: X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Oct 2018 19:30:37 -0300 Renato Lui Geh wrote: > Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET. > This was fixed by assigning the correct value instead. > > Signed-off-by: Renato Lui Geh It obviously doesn't make much difference, but as you are respinning anyway... Please could you always put fixes at the beginning of a set as it makes it easier to back port them. It think this one is simple enough that it is worth applying to the stable kernels. (naturally I could do that anyway as the rebase is trivial, so I'm just encouraging good practice by asking you to do it in v3!) Thanks, Jonathan > --- > drivers/staging/iio/adc/ad7780.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c > index 27972563bb6a..06700fe554a2 100644 > --- a/drivers/staging/iio/adc/ad7780.c > +++ b/drivers/staging/iio/adc/ad7780.c > @@ -100,7 +100,7 @@ static int ad7780_read_raw(struct iio_dev *indio_dev, > *val2 = chan->scan_type.realbits - 1; > return IIO_VAL_FRACTIONAL_LOG2; > case IIO_CHAN_INFO_OFFSET: > - *val -= (1 << (chan->scan_type.realbits - 1)); > + *val = -(1 << (chan->scan_type.realbits - 1)); > return IIO_VAL_INT; > } >