Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1597605lqa; Mon, 29 Apr 2024 13:07:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXthvKYymY7bWDTANHKsAzUIU2bewh0kt/v4w6UkReWQI0dSVHTpBUJaeIM3uRb5xViZ1rJp2ePXUOAz51QdDF/9MjZLuvPtpt88N53jA== X-Google-Smtp-Source: AGHT+IHs2jbrknYHNrPrrMIiMr5En32nWElQZAOZUE/srjoLk/MDIkTMX7WVB+sou9iNUgI0szMA X-Received: by 2002:a17:906:787:b0:a55:a895:46ae with SMTP id l7-20020a170906078700b00a55a89546aemr7215699ejc.63.1714421259276; Mon, 29 Apr 2024 13:07:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714421259; cv=pass; d=google.com; s=arc-20160816; b=x4Ul4fPPcyQlPJQ1kqMxDv62kQwPnnIAPK7zWYjZuZ+Gw/H0tAuV9lhv0p/jcXrdaN mkpq1NNOtnl62GMsbP49FjgzFB4C2tAOqSC9GnTaXm/tERs/vGAIFDgTl3qs0/ZKJmHh 1pxK0bQgMFYgJtrMCodwrvFyT/2TdNHe62It+U+jO6vRfWoQ8JfI4ac8hO3uSVG3LtQH 9AKHWxveVOQnmOp5Ho8EyNiQwJZPMm9cg27nyncWppbncKDy6z0GIqmu/2j659mRpi2I VQoyEzCAqRcGzzrYqqnl+kFqfYNOyh/yBWz59nYCDTugrhlwwj+bYCsIvEpO0Vu8keSi j8mA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=rqmQeuUDvEH+ZecxkQqtQPdiSTlbQ2+ECqTQmo3FJZE=; fh=uz/eHZy5lnddcDuyDrn0zIjrA7gIjPRXPlC+dwkgK2Y=; b=PYSHRJnDzRv2nFFD5gCkSINpqXTpaGtmSVabCe0cFDag0Tf/NJEgkToxniTfWzRnIx f5/UhonX1pthRBXyjpN+jMWnHgYwQfOj2DWmJwF8F+6MjVUgPalZiqrwChYE4bzwiqU7 q7851ZxexiqSetCjXFCDaKqHhgjU1YHrHRUIu2mNQW3lb+kFLusdmp8CRSf4Y/UxMvSz 5x3JHQ5/vH9NkZbLZgOkBScHWVRxsgQbXQvbgBmivbhyPSnd4/pg46T3T6OoBTJa+2H1 HVO2MZExWkZmfLxpFVuBr7aHXyi8+xaAmlCwCKur8cg+YXN1jAiYTKZ6ZhkB9rcQmaMv lKiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d2Eu+bDc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t22-20020a1709060c5600b00a526d2a5aabsi13843752ejf.708.2024.04.29.13.07.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 13:07:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d2Eu+bDc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 549E11F22B0D for ; Mon, 29 Apr 2024 20:07:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA1E7145B00; Mon, 29 Apr 2024 20:07:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d2Eu+bDc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F20A21442FD; Mon, 29 Apr 2024 20:06:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714421220; cv=none; b=JHZyneKZbcosxBtYHIs679lL9Vnbu30aatlB0Nb8RQu6RUijHUtefB4BpnE8Z9w3TMC5NMc+BQg2KiihCuIyVklDkAZePUcVa+b04/TCGh4DVOfvddjO2mc30TO6nZ0i1/DC13ToOu8SfkjBDSSLiqr2BtxkkIlSd1s1tZdxTd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714421220; c=relaxed/simple; bh=4A88CtFhO9g0Vm1pMTxYoO6IBnLwMZJMkAtxvaB8yTQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PD//LsOY5mZSEnj7mhp8kSd5Z2dfL2ZruNetOb9eE8NvqJOcPEg3bkIqzx/zuUfgPdpIEIFUWDZfEPu+uKEIxe9p7MN08LgDDfPxaF/OQ8pwnGJXfGZSJz/Pr9YDRIMMvJjge7dPhVY9bJVsyflDSMo+7IWQblxJyHwYw/D+N/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d2Eu+bDc; arc=none smtp.client-ip=10.30.226.201 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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(-) >