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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8EFDEC4345F for ; Mon, 29 Apr 2024 20:07:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a5Yyn8BFo60UT8Fl/LWmfE3ZjvwEjZDpSn1OB1dKLcc=; b=FHMzEu52+JrD2s lBzY9RSFQNdHZzU3MX1EBtV8qlX89MkCCs1uwiJaXGXG69COhSpo/QtU7H5lhI7Z268AhCZAcQXSn bCNKwGr7MpivHSRWNBcDM/+bvPjGMFfwwqe5yN5dy4alFk1Tz8D5vGNGjE7IGLlXc2XvTL6wMLkK4 8KVPagN4xYF8bsGacUMXUO/Y0e2Z2OIbXwRIwm/ZMq8qnnmTmzCjA6BtYCfqUY1oqnBP0SvbAc2xT E+8uCyEVSFM5+0nlm8tYjVCXjuxNBbjGl56GPlwJFBQUXlJPgeCM70LmbDRObaUSs0TcLynpUFVpm /fSLOeG+woguGzwhIz9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1XHG-000000048K4-0kTB; Mon, 29 Apr 2024 20:07:06 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1XHD-000000048GH-006z for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 20:07:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 4A139CE01FF; Mon, 29 Apr 2024 20:07:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C298EC4AF14; Mon, 29 Apr 2024 20:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714421219; bh=4A88CtFhO9g0Vm1pMTxYoO6IBnLwMZJMkAtxvaB8yTQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=d2Eu+bDcB2VBGxzdNS8FaG+wTdSF6EoPn0gvxQjza1D737089iPlbg0X3lOuJ7qth yva0Bwg83ykirUtT774C38MB8baxZTN7nAsmiaI4FJKiv2i9/gmHixZUCEOw9MeQ1h zg6AbK4mBXTHZT+4Cvu/os75HZWacf7PReftRCBMhYTrKwp2XbiaubHfGdTuvfZ5rg BONtufjopg6ZlMGGhKRZppD2XFeHXoXqHwen53ezbgea/Cg+w9UpW2hDxgRMTqxJC+ 07vhFpg9Xe221vL8ol/WQGRNXarUta0VmHYfVOgReolABJxkH5ps5kZNfzH3AFlg8w 9NFnqEt6HKlLQ== Date: Mon, 29 Apr 2024 21:06:48 +0100 From: Jonathan Cameron To: Wolfram Sang Cc: linux-iio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH 0/8] iio: use 'time_left' instead of 'timeout' with wait_for_*() functions Message-ID: <20240429210648.4b429d31@jic23-huawei> In-Reply-To: <20240429113313.68359-1-wsa+renesas@sang-engineering.com> References: <20240429113313.68359-1-wsa+renesas@sang-engineering.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_130703_280942_69AD9319 X-CRM114-Status: GOOD ( 16.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 29 Apr 2024 13:33:03 +0200 Wolfram Sang wrote: > There is a confusing pattern in the kernel to use a variable named 'timeout' to > store the result of wait_for_*() functions causing patterns like: > > timeout = wait_for_completion_timeout(...) > if (!timeout) return -ETIMEDOUT; > > with all kinds of permutations. Use 'time_left' as a variable to make the code > obvious and self explaining. > > This is part of a tree-wide series. The rest of the patches can be found here > (some parts may still be WIP): > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/time_left > > Because these patches are generated, I audit them before sending. This is why I > will send series step by step. Build bot is happy with these patches, though. > No functional changes intended. Nice improvement. Applied > > Wolfram Sang (8): > iio: adc: ad_sigma_delta: use 'time_left' variable with > wait_for_completion_timeout() > iio: adc: exynos_adc: use 'time_left' variable with > wait_for_completion_timeout() > iio: adc: fsl-imx25-gcq: use 'time_left' variable with > wait_for_completion_interruptible_timeout() > iio: adc: intel_mrfld_adc: use 'time_left' variable with > wait_for_completion_interruptible_timeout() > iio: adc: stm32-adc: use 'time_left' variable with > wait_for_completion_interruptible_timeout() > iio: adc: stm32-dfsdm-adc: use 'time_left' variable with > wait_for_completion_interruptible_timeout() > iio: adc: twl6030-gpadc: use 'time_left' variable with > wait_for_completion_interruptible_timeout() > iio: pressure: zpa2326: use 'time_left' variable with > wait_for_completion_interruptible_timeout() > > drivers/iio/adc/ad_sigma_delta.c | 6 +++--- > drivers/iio/adc/exynos_adc.c | 16 ++++++++-------- > drivers/iio/adc/fsl-imx25-gcq.c | 10 +++++----- > drivers/iio/adc/intel_mrfld_adc.c | 12 ++++++------ > drivers/iio/adc/stm32-adc.c | 10 +++++----- > drivers/iio/adc/stm32-dfsdm-adc.c | 12 ++++++------ > drivers/iio/adc/twl6030-gpadc.c | 8 ++++---- > drivers/iio/pressure/zpa2326.c | 10 +++++----- > 8 files changed, 42 insertions(+), 42 deletions(-) > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel