From patchwork Fri Jul 14 09:31:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9840337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B5AB560212 for ; Fri, 14 Jul 2017 09:33:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7B762876A for ; Fri, 14 Jul 2017 09:33:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C3B128783; Fri, 14 Jul 2017 09:33:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 570282876A for ; Fri, 14 Jul 2017 09:33:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753650AbdGNJco (ORCPT ); Fri, 14 Jul 2017 05:32:44 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:52310 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753574AbdGNJcm (ORCPT ); Fri, 14 Jul 2017 05:32:42 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0M8zUb-1dMLUX3fJ7-00CQMO; Fri, 14 Jul 2017 11:31:33 +0200 From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Greg Kroah-Hartman Cc: Linus Torvalds , Tejun Heo , Guenter Roeck , linux-ide@vger.kernel.org, linux-media@vger.kernel.org, akpm@linux-foundation.org, dri-devel@lists.freedesktop.org, Arnd Bergmann , stable@vger.kernel.org, Hartmut Knaack , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH 10/14] staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read Date: Fri, 14 Jul 2017 11:31:03 +0200 Message-Id: <20170714093129.1366900-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170714092540.1217397-1-arnd@arndb.de> References: <20170714092540.1217397-1-arnd@arndb.de> X-Provags-ID: V03:K0:7kUZJ7IPymt25S8JQd8PtHIZcXHdXNXETpAme/TzfjsnvVhbWSg 9rc+vbvWJSliTiAs45fkeWbTvpV0c4eJxrM3SSNEpuS0cp1jtnJ4hNKPTnXw8FRejQD4Vam ebs+Xp4m2YdRHThH8Wnua+aQcjiGPrRHqhdkSm7ac3ZgecAIySFTWYif8n3peng7CLmrU53 lpA0Dkf09z6iqvQcfRxXg== X-UI-Out-Filterresults: notjunk:1; V01:K0:UmAmo0eEBxM=:5kaNQ1dp2U2OK1jgvtzYAk fpwNa5Qn641OVBY3rNpKqReuSPoQvgmkeNnyrE6Z2p1BMLJf3Dy7x6LwSM8kLpugMFvP8CAiE 5ohfkRoAyB/ElRcRq345G4rgjSJGGr+DgcedABxYoJsnSuSAmGEWlz76Q0CYC6DF9kDRTbkXj IxVI6mRTOVsouGiUdcpQknFe01A/bwh1ptebS6+7kz+nt1yuOAlMgAr23cWWe6U8gEEAa76g9 x/kO6P2N8Vbw3gwf/JpxHYXsVK13ulFfiiDiZVQYEzoXY7sKK619Xl3IjHOSUi3efRs095P2Y EYAvGO5pHwfhtB50IKczGt2qZdmiM3/j7Tcy8zwjL5f/dw0w/UXlApmD92JihKDR2p8hBUrrZ MQ9Z4Qdtjr6PynyTuQj8nVrBoT8FAqDN6Nk1AInnLarAOixOtMatQbwm+pTKs5QTtFnWdcdZy exYdDlAEa3X9knGAyg5hnOvaAnySicnaTziyep9d1R0DR3vaeNHfYPLHS0xRMTH7JxIj0GRRN lW3w33ZBWEaCV8GHU0+ymbGLW6ZdflIC7P0VB2j8wrY/sMRarHe4/g33AROmtTi/fzYtkO7tE hqLW3qB8EC8bi7DUYSkF6UlI8EkbDg15t6DIgTjZEvmTuB+OjuZptZ2vxOpV8fmngjKjXxJfM /4g8dbu2I7GRB6vPQksQC/UfqA0FkHfwS6SvwBz6Zn0PysnI4Pd/5TE0AWk+kTEDDVTHe75fH oucMjrFAF3gi2gXjlNya0Jccew5ZXAX50dW0rw== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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.") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann --- drivers/staging/iio/resolver/ad2s1210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index a6a8393d6664..3e00df74b18c 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -472,7 +472,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev, long m) { struct ad2s1210_state *st = iio_priv(indio_dev); - bool negative; + u16 negative; int ret = 0; u16 pos; s16 vel;