From patchwork Wed Apr 3 06:23:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 15834 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1BAF423DEA for ; Wed, 3 Apr 2013 06:35:55 +0000 (UTC) Received: from mail-ea0-f199.google.com (mail-ea0-f199.google.com [209.85.215.199]) by fiordland.canonical.com (Postfix) with ESMTP id 0B471A1836F for ; Wed, 3 Apr 2013 06:35:55 +0000 (UTC) Received: by mail-ea0-f199.google.com with SMTP id z7sf1636217eaf.10 for ; Tue, 02 Apr 2013 23:35:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=B+ZAUUohlzHyp6js5kPV7tGF3+wFyBEgobEzHKcymnc=; b=Pz4NuMkmrnf6BOtIhLFveNr5JFZXsGZ5SzAA9NmPPXvDY8y3bfZ+2cABJsLPqcan7b GmcqpW7SEk3te/1O6dCR63YZJ9KPWzexhhkdZyH7hYS1b0K/8KWq7TG3lDgA9j1Y8kdP ZlgWYEQEMWbwlU8klvq9HHsSxD6j05nHyyF5Kry2iL/75EeGSVP8dM59j2LleQ4z8Wdj JF16t2LMo1VlrVm40axdURMPuH8zrougaDh7pWoGX/6gbVaoEeCakJpNUHcBglOSXTev m9EJ0goFsDTIlmVAh1YEtEeCvoO8mAuWla3Cb3YrRICe6i3Nh0i1T3eLBw8IUxTc4oOc 94zg== X-Received: by 10.180.198.210 with SMTP id je18mr137946wic.1.1364970954924; Tue, 02 Apr 2013 23:35:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.92.68 with SMTP id ck4ls1063527wib.24.canary; Tue, 02 Apr 2013 23:35:54 -0700 (PDT) X-Received: by 10.180.11.136 with SMTP id q8mr697310wib.18.1364970954864; Tue, 02 Apr 2013 23:35:54 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id j10si6181355wiv.83.2013.04.02.23.35.54 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 23:35:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id cy12so1403402veb.4 for ; Tue, 02 Apr 2013 23:35:53 -0700 (PDT) X-Received: by 10.52.93.20 with SMTP id cq20mr246210vdb.38.1364970953792; Tue, 02 Apr 2013 23:35:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp157096ved; Tue, 2 Apr 2013 23:35:53 -0700 (PDT) X-Received: by 10.66.163.101 with SMTP id yh5mr1484280pab.22.1364970952732; Tue, 02 Apr 2013 23:35:52 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id ac4si5435529pad.248.2013.04.02.23.35.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 23:35:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id v14so454549pde.4 for ; Tue, 02 Apr 2013 23:35:52 -0700 (PDT) X-Received: by 10.68.39.129 with SMTP id p1mr771708pbk.19.1364970952153; Tue, 02 Apr 2013 23:35:52 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPS id hs8sm4736074pbc.27.2013.04.02.23.35.49 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 23:35:51 -0700 (PDT) From: Sachin Kamat To: linux-iio@vger.kernel.org Cc: jic23@cam.ac.uk, jic23@kernel.org, ch.naveen@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/2] adc: exynos_adc: Fix incorrect variable type Date: Wed, 3 Apr 2013 11:53:59 +0530 Message-Id: <1364970239-8242-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364970239-8242-1-git-send-email-sachin.kamat@linaro.org> References: <1364970239-8242-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQm3TUHWbsllDYcHpnKk+rokEOIEgT2OEUvDfluvvObNlCeWs5DKJ5uII9OYHl3GOy3IczGJ X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , wait_for_completion_interruptible_timeout() returns negative value on error but is assigned to an unsigned variable. Though this might not matter much as the return value is only tested for '0', for the sake of code correctness modify the variable type suitably. Without this patch we get the following smatch error: drivers/iio/adc/exynos_adc.c:147 exynos_read_raw() error: 'wait_for_completion_interruptible_timeout()' returns negative and 'timeout' is unsigned Signed-off-by: Sachin Kamat --- drivers/iio/adc/exynos_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index 22d034a..3bf5132 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -118,7 +118,7 @@ static int exynos_read_raw(struct iio_dev *indio_dev, long mask) { struct exynos_adc *info = iio_priv(indio_dev); - unsigned long timeout; + long timeout; u32 con1, con2; if (mask != IIO_CHAN_INFO_RAW)