From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B4B4C04AB1 for ; Mon, 13 May 2019 07:28:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 371D6208C3 for ; Mon, 13 May 2019 07:28:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RQ8CTUDz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=toradex.com header.i=@toradex.com header.b="XckAKA7V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 371D6208C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=toradex.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KNi6W9RSLXDoIw8FUfKPrRNqxSYFOP+64+wx0XzbQQ0=; b=RQ8CTUDz3XGRp3 0of5B1SnYw9MJncBJUaycjlCxT+U2Zr0UGV2lJYGuG+CbThzyMLHjCKsvw79IgWNq7TlkSHbS1B17 NQ/o5B2QN8XXVk5flum+iY8Uh8wC0Mw3/3PHpEuzD+WO5ZMM1DQXJSngyV9mUEtBPkp5El4qqwYbf H0cgAaW7E0xSUFq5+xvT5kJbp+Oq0VZcPyFw6YPXzhZVpLmEh6//9E/q8GKsRDXYwMTqMzP+l/NqZ UKbk57jSqYU7MWYE8XdCGGp9Hghs+YMjtuesKOS8daV/mQ/VkPa1wTuT1jKIQXyI4IvqxGUHNopzY N1CQPEULL7RE/88HLADw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQ5No-0000pV-U8; Mon, 13 May 2019 07:28:24 +0000 Received: from mail-eopbgr50097.outbound.protection.outlook.com ([40.107.5.97] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQ5Nm-0000ok-14 for linux-arm-kernel@lists.infradead.org; Mon, 13 May 2019 07:28:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6dbTAC//XHrFVIZfXDI+bV77HQpSpYzq9ex1ut4pJcg=; b=XckAKA7VFgGqj1+tFvJTSBBlwN5+SpL0VMNfD06Xa0BxSHHOApFtoZGC+5u+clFDuwy5kT/n3ITymFAN8r/34VF6hi4Sk47ihu87FXU1u/P4Kfc3QMh3UFRkcLGXiQ+Y8eOOsyZIKCJtI60IQpfyuyMJguULAPg6KyEItwzzhLQ= Received: from VI1PR0502MB3965.eurprd05.prod.outlook.com (52.134.17.157) by VI1PR0502MB3087.eurprd05.prod.outlook.com (10.175.22.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1878.22; Mon, 13 May 2019 07:28:18 +0000 Received: from VI1PR0502MB3965.eurprd05.prod.outlook.com ([fe80::48ff:f344:98da:6571]) by VI1PR0502MB3965.eurprd05.prod.outlook.com ([fe80::48ff:f344:98da:6571%5]) with mapi id 15.20.1878.024; Mon, 13 May 2019 07:28:18 +0000 From: Philippe Schenker To: "jic23@kernel.org" Subject: Re: [PATCH 4/5] iio: stmpe-adc: Use wait_for_completion_timeout Thread-Topic: [PATCH 4/5] iio: stmpe-adc: Use wait_for_completion_timeout Thread-Index: AQHVBOJHMVYXdjmHB0653c7vvGs0gKZluzwAgAL12oA= Date: Mon, 13 May 2019 07:28:17 +0000 Message-ID: <6bc5bf4c854288fae0591f33ea9ae4e5c4091616.camel@toradex.com> References: <20190507143615.28477-1-dev@pschenker.ch> <20190507143615.28477-4-dev@pschenker.ch> <20190511111548.504948ae@archlinux> In-Reply-To: <20190511111548.504948ae@archlinux> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=philippe.schenker@toradex.com; x-originating-ip: [46.140.72.82] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c68ebad4-3e66-4d46-c477-08d6d77491b1 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:VI1PR0502MB3087; x-ms-traffictypediagnostic: VI1PR0502MB3087: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0036736630 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(136003)(366004)(396003)(39840400004)(376002)(189003)(199004)(6916009)(6116002)(53936002)(478600001)(3846002)(5660300002)(14454004)(6246003)(2501003)(6506007)(91956017)(76116006)(73956011)(66446008)(64756008)(66556008)(66476007)(86362001)(66946007)(316002)(102836004)(486006)(476003)(2616005)(446003)(11346002)(44832011)(99286004)(7736002)(8676002)(81156014)(81166006)(4326008)(2351001)(8936002)(25786009)(305945005)(26005)(6512007)(54906003)(66066001)(76176011)(6486002)(14444005)(229853002)(36756003)(7416002)(68736007)(186003)(71200400001)(71190400001)(256004)(118296001)(5640700003)(2906002)(6436002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0502MB3087; H:VI1PR0502MB3965.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: toradex.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: aLasiDEjj1AmLmwKwpfhyXkxZxO9B8a3A6U3JErB2WuXUw5RLUCfL6vZjRfLTwRqEkwupWe0x3SLFpat2PirX+DeRso2t4rACfDNv3ZcWFfxSLUWpdR5z2Xy0f71DzTDDpLt+Vc3gbk9+RUIw8XBT3bVcJq+Fu3uKf5rjiLlcQe8D76OfFfi7nq4u0gAEQRT6fUcAZkbpI8yHBgGHBTOBYMCFo2UWjIi1hWEeGBgqxZg2OmPqH6036B57wVlLK53A6t/HdXhfNBu0tg/MEQxwmJQpk74SswAlRAOtfFWOarD6rqBUfpb9YrGX2nRyyGYGsZdFwVVmk/mWC+7cdByAiVnWIvBLBI2RNobL7PrnWgc3JAoMepEobow8oC5bZ81xvcrEAGP+Ch3Z7/mXgeUPX7JeXX1QGbwWYpT4Mn4vgQ= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: c68ebad4-3e66-4d46-c477-08d6d77491b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2019 07:28:17.9187 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3087 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190513_002822_069403_A27B9873 X-CRM114-Status: GOOD ( 23.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mcoquelin.stm32@gmail.com" , "lars@metafoo.de" , "pmeerw@pmeerw.net" , Marcel Ziswiler , "linux-kernel@vger.kernel.org" , "stefan@agner.ch" , "linux-iio@vger.kernel.org" , "David.Laight@ACULAB.COM" , Max Krummenacher , "knaack.h@gmx.de" , "lee.jones@linaro.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "alexandre.torgue@st.com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 2019-05-11 at 11:15 +0100, Jonathan Cameron wrote: > On Tue, 7 May 2019 16:36:14 +0200 > Philippe Schenker wrote: > > > From: Philippe Schenker > > > > Use wait_for_completion_timeout instead of > > wait_for_completion_interuptible_timeout. > > > > The interruptible variant gets constantly interrupted if a user > > program is compiled with the -pg option. > > The killable variant was not used due to the fact that a second > > program, reading on this device, that gets killed is then also killing > > that wait. > > > > Signed-off-by: Philippe Schenker > Hi Phillippe > > This one clashed a little bit with our earlier patch to remove the > unnecessary assignment. I've applied it by hand but please check it. > > Applied to the togreg branch of iio.git and pushed out as testing > for the autobuilders to play with it. > > Thanks, > > Jonathan Hmm, yeah I see it sorry for that! Somehow that line went in again in this patch. Don't know why... Anyway I checked it and it looks good. Thank you! Philippe > > --- > > > > drivers/iio/adc/stmpe-adc.c | 18 ++++-------------- > > 1 file changed, 4 insertions(+), 14 deletions(-) > > > > diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c > > index 82b43e4522b6..cc752a47444c 100644 > > --- a/drivers/iio/adc/stmpe-adc.c > > +++ b/drivers/iio/adc/stmpe-adc.c > > @@ -77,17 +77,11 @@ static int stmpe_read_voltage(struct stmpe_adc *info, > > stmpe_reg_write(info->stmpe, STMPE_REG_ADC_CAPT, > > STMPE_ADC_CH(info->channel)); > > > > - *val = info->value; > > - > > - ret = wait_for_completion_interruptible_timeout > > - (&info->completion, STMPE_ADC_TIMEOUT); > > + ret = wait_for_completion_timeout(&info->completion, STMPE_ADC_TIMEOUT); > > > > if (ret <= 0) { > > mutex_unlock(&info->lock); > > - if (ret == 0) > > - return -ETIMEDOUT; > > - else > > - return ret; > > + return -ETIMEDOUT; > > } > > > > *val = info->value; > > @@ -116,15 +110,11 @@ static int stmpe_read_temp(struct stmpe_adc *info, > > stmpe_reg_write(info->stmpe, STMPE_REG_TEMP_CTRL, > > STMPE_START_ONE_TEMP_CONV); > > > > - ret = wait_for_completion_interruptible_timeout > > - (&info->completion, STMPE_ADC_TIMEOUT); > > + ret = wait_for_completion_timeout(&info->completion, STMPE_ADC_TIMEOUT); > > > > if (ret <= 0) { > > mutex_unlock(&info->lock); > > - if (ret == 0) > > - return -ETIMEDOUT; > > - else > > - return ret; > > + return -ETIMEDOUT; > > } > > > > /* _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel