From patchwork Mon Apr 29 11:33:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13646663 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 9B9A5C4345F for ; Mon, 29 Apr 2024 11:33:30 +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:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=D6AX2FGmxfoK9p7mGV14tFPlBw4UKVHjpAuuDwx/oKM=; b=Wwczz/jR4lCmZV h/SiCGWKGBYkWETyBgmC5z0Ln+pnOeGMq5UIcOlzYioQKdJu6XfHo1zwWba+iL8205DNPnbNlmF1P ME2oBJGIzU3bBhgF2JyYPYyP7b+H03gLyo99pjbyWG/BcO6juDB6dykyIIXdwWLgPHKSM+PC2COkf mTqfiKYppSHKyCGP7wC+F2Hdz86nQeVI78qg0UZWcL3Pyhv4g6W3Zx4tbtkE/8hCb4Cm4mBWhJKCu wPUcGnnQlS5+9dcbQtiV9SIYooncWVuzEQMA79zmb/0l1NrkGA3pzDGYMu21Ma312clfFTdyBF0uR 1ORtF+NIRJrDFOyokR7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PG2-00000002SiS-3jhl; Mon, 29 Apr 2024 11:33:18 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1PFz-00000002She-447e for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 11:33:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=k1; bh=Vgux3aE3wJGJ6D mN+k2dPKSst7IED0Ek/dvVSF5yq0g=; b=LZifYU4S7NUCZENs8jHvem7CPVc3RO Z3op2lLszJOlJW1oB5HiWE7k2lz1H+HkpBtnYKqtl7Lp8rQRdP9YXnjf6sPTzO4j Wk8RtkToMA8SV96difp+7EyiKQOCJ2ifDGF1OE2meSCScZGzXtRX8dv8uSIjrXRT 1Gk/Roz7bw3hlJUSwnHCOHS8z+lRdyxGEJC8I2TXDabw4CYqDmJXVGsI7MEP4T9z D8cDOIGDMfMvH96D+lULSj1D+HbRqQk9cZlnluoi0G+iWOM83jhL/6p5zh5KS0ir JwwH5q/TFzeIOAMMa0JiHpRDafNE5erJTauOlwdCZG6ig419naUxKWmg== Received: (qmail 2280950 invoked from network); 29 Apr 2024 13:33:14 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 29 Apr 2024 13:33:14 +0200 X-UD-Smtp-Session: l3s3148p1@eC5qnjoXbxxtKPB4 From: Wolfram Sang To: linux-iio@vger.kernel.org Cc: Wolfram Sang , 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: [PATCH 0/8] iio: use 'time_left' instead of 'timeout' with wait_for_*() functions Date: Mon, 29 Apr 2024 13:33:03 +0200 Message-ID: <20240429113313.68359-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_043316_304657_1007B2A7 X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. 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(-)