linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] media: use 'time_left' instead of 'timeout' with wait_*() functions
@ 2024-08-05 21:51 Wolfram Sang
  2024-08-05 21:51 ` [PATCH v2 2/8] media: atmel-isi: use 'time_left' variable with wait_for_completion_timeout() Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Wolfram Sang @ 2024-08-05 21:51 UTC (permalink / raw)
  To: linux-media
  Cc: linux-arm-kernel, Alexandre Belloni, linux-samsung-soc,
	Claudiu Beznea, Eugen Hristev, Jonathan Hunter, Benoit Parrot,
	Wolfram Sang, Thierry Reding, Bluecherry Maintainers,
	Krzysztof Kozlowski, Sylwester Nawrocki, linux-tegra,
	Fabien Dessenne, Dmitry Osipenko, Mauro Carvalho Chehab,
	Ismael Luceno, Andrey Utkin, Michael Tretter

Changes since v1:
* fixed another occasion in the allegro driver (Thanks, Michael)
* added tags (Thanks Ismael and Thierry)
* rebased to 6.11-rc1

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_*() 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. Also correct the type of the variable if
the original code got it wrong.

This is part of a tree-wide series. The rest of the patches can be found here:

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):
  media: allegro: use 'time_left' variable with
    wait_for_completion_timeout()
  media: atmel-isi: use 'time_left' variable with
    wait_for_completion_timeout()
  media: bdisp: use 'time_left' variable with wait_event_timeout()
  media: fimc-is: use 'time_left' variable with wait_event_timeout()
  media: platform: exynos-gsc: use 'time_left' variable with
    wait_event_timeout()
  media: solo6x10: use 'time_left' variable with
    wait_for_completion_timeout()
  media: tegra-vde: use 'time_left' variable with
    wait_for_completion_interruptible_timeout()
  media: ti: cal: use 'time_left' variable with wait_event_timeout()

 drivers/media/pci/solo6x10/solo6x10-p2m.c     |  8 +++----
 .../media/platform/allegro-dvt/allegro-core.c | 24 +++++++++----------
 drivers/media/platform/atmel/atmel-isi.c      |  8 +++----
 .../media/platform/nvidia/tegra-vde/h264.c    | 10 ++++----
 .../platform/samsung/exynos-gsc/gsc-core.c    | 10 ++++----
 .../platform/samsung/exynos4-is/fimc-core.c   | 10 ++++----
 .../media/platform/st/sti/bdisp/bdisp-v4l2.c  | 10 ++++----
 drivers/media/platform/ti/cal/cal.c           |  8 +++----
 8 files changed, 44 insertions(+), 44 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2024-08-07 14:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 21:51 [PATCH v2 0/8] media: use 'time_left' instead of 'timeout' with wait_*() functions Wolfram Sang
2024-08-05 21:51 ` [PATCH v2 2/8] media: atmel-isi: use 'time_left' variable with wait_for_completion_timeout() Wolfram Sang
2024-08-05 21:51 ` [PATCH v2 4/8] media: fimc-is: use 'time_left' variable with wait_event_timeout() Wolfram Sang
2024-08-05 21:51 ` [PATCH v2 5/8] media: platform: exynos-gsc: " Wolfram Sang
2024-08-07 13:08 ` [PATCH v2 0/8] media: use 'time_left' instead of 'timeout' with wait_*() functions Hans Verkuil
2024-08-07 13:16   ` Hans Verkuil
2024-08-07 14:26     ` Wolfram Sang
2024-08-07 14:29       ` Hans Verkuil

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