linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] iio: use 'time_left' instead of 'timeout' with wait_for_*() functions
@ 2024-04-29 11:33 Wolfram Sang
  2024-04-29 11:33 ` [PATCH 2/8] iio: adc: exynos_adc: use 'time_left' variable with wait_for_completion_timeout() Wolfram Sang
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Wolfram Sang @ 2024-04-29 11:33 UTC (permalink / raw)
  To: linux-iio
  Cc: Wolfram Sang, imx, linux-arm-kernel, linux-kernel,
	linux-samsung-soc, linux-stm32

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(-)

-- 
2.43.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-04-30  1:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 11:33 [PATCH 0/8] iio: use 'time_left' instead of 'timeout' with wait_for_*() functions Wolfram Sang
2024-04-29 11:33 ` [PATCH 2/8] iio: adc: exynos_adc: use 'time_left' variable with wait_for_completion_timeout() Wolfram Sang
2024-04-29 11:33 ` [PATCH 3/8] iio: adc: fsl-imx25-gcq: use 'time_left' variable with wait_for_completion_interruptible_timeout() Wolfram Sang
2024-04-30  1:36   ` Peng Fan
2024-04-29 11:33 ` [PATCH 5/8] iio: adc: stm32-adc: " Wolfram Sang
2024-04-29 11:33 ` [PATCH 6/8] iio: adc: stm32-dfsdm-adc: " Wolfram Sang
2024-04-29 20:06 ` [PATCH 0/8] iio: use 'time_left' instead of 'timeout' with wait_for_*() functions Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).