Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753162AbdHOBSq (ORCPT ); Mon, 14 Aug 2017 21:18:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56166 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082AbdHOBSm (ORCPT ); Mon, 14 Aug 2017 21:18:42 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Jonathan Cameron Subject: [PATCH 3.18 07/16] staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read Date: Mon, 14 Aug 2017 18:18:16 -0700 Message-Id: <20170815011733.697617665@linuxfoundation.org> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170815011733.115636913@linuxfoundation.org> References: <20170815011733.115636913@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 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: 1237 Lines: 38 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 105967ad68d2eb1a041bc041f9cf96af2a653b65 upstream. gcc-7 points out an older regression: drivers/staging/iio/resolver/ad2s1210.c: In function 'ad2s1210_read_raw': drivers/staging/iio/resolver/ad2s1210.c:515:42: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] The original code had 'unsigned short' here, but incorrectly got converted to 'bool'. This reverts the regression and uses a normal type instead. Fixes: 29148543c521 ("staging:iio:resolver:ad2s1210 minimal chan spec conversion.") Signed-off-by: Arnd Bergmann Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/resolver/ad2s1210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -466,7 +466,7 @@ static int ad2s1210_read_raw(struct iio_ long m) { struct ad2s1210_state *st = iio_priv(indio_dev); - bool negative; + u16 negative; int ret = 0; u16 pos; s16 vel;