linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] i2c: use 'time_left' with wait_for_*
@ 2024-04-27 20:35 Wolfram Sang
  2024-04-27 20:35 ` [PATCH 02/15] i2c: digicolor: use 'time_left' variable with wait_for_completion_timeout() Wolfram Sang
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Wolfram Sang @ 2024-04-27 20:35 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, imx, linux-arm-kernel, linux-arm-msm, linux-kernel,
	linux-mips, linux-omap, linux-rockchip, 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_*() 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
self explaining.

This is the I2C part of a tree-wide series. The rest of the patches can
be found here (slightly WIP):

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/time_left

Because these patches are generated, they need manual audit. So, I will
send them step by step. This is part 1 and also a call for opinions if
this is a desirable change. But at least in the I2C realm, I really want
to have it proper.

Build bot is happy with these patches and I also compile tested them
(except two). No functional changes intended.

Wolfram Sang (15):
  i2c: amd-mp2-plat: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: digicolor: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: exynos5: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: hix5hd2: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: imx-lpi2c: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: omap: use 'time_left' variable with wait_for_completion_timeout()
  i2c: st: use 'time_left' variable with wait_for_completion_timeout()
  i2c: stm32f4: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: stm32f7: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: synquacer: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: jz4780: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: qcom-geni: use 'time_left' variable with
    wait_for_completion_timeout()
  i2c: rk3x: use 'time_left' variable with wait_event_timeout()
  i2c: s3c2410: use 'time_left' variable with wait_event_timeout()
  i2c: pxa: use 'time_left' variable with wait_event_timeout()

-- 
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] 14+ messages in thread

end of thread, other threads:[~2024-05-02 11:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-27 20:35 [PATCH 00/15] i2c: use 'time_left' with wait_for_* Wolfram Sang
2024-04-27 20:35 ` [PATCH 02/15] i2c: digicolor: use 'time_left' variable with wait_for_completion_timeout() Wolfram Sang
2024-04-28  4:38   ` Baruch Siach
2024-04-27 20:35 ` [PATCH 03/15] i2c: exynos5: " Wolfram Sang
2024-04-27 20:35 ` [PATCH 05/15] i2c: imx-lpi2c: " Wolfram Sang
2024-04-28  1:45   ` Peng Fan
2024-04-27 20:35 ` [PATCH 07/15] i2c: st: " Wolfram Sang
2024-04-28 12:15   ` Uwe Kleine-König
2024-04-27 20:36 ` [PATCH 08/15] i2c: stm32f4: " Wolfram Sang
2024-04-27 20:36 ` [PATCH 09/15] i2c: stm32f7: " Wolfram Sang
2024-04-27 20:36 ` [PATCH 13/15] i2c: rk3x: use 'time_left' variable with wait_event_timeout() Wolfram Sang
2024-04-27 20:36 ` [PATCH 14/15] i2c: s3c2410: " Wolfram Sang
2024-04-30  0:07 ` [PATCH 00/15] i2c: use 'time_left' with wait_for_* Andi Shyti
2024-05-02 11:29 ` Andi Shyti

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