linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-media@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-samsung-soc@vger.kernel.org,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	Eugen Hristev <eugen.hristev@collabora.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Benoit Parrot <bparrot@ti.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Bluecherry Maintainers <maintainers@bluecherrydvr.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	linux-tegra@vger.kernel.org,
	Fabien Dessenne <fabien.dessenne@foss.st.com>,
	Dmitry Osipenko <digetx@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Ismael Luceno <ismael@iodev.co.uk>,
	Andrey Utkin <andrey_utkin@fastmail.com>,
	Michael Tretter <m.tretter@pengutronix.de>
Subject: [PATCH v2 0/8] media: use 'time_left' instead of 'timeout' with wait_*() functions
Date: Mon,  5 Aug 2024 23:51:13 +0200	[thread overview]
Message-ID: <20240805215123.3528-1-wsa+renesas@sang-engineering.com> (raw)

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



             reply	other threads:[~2024-08-05 21:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 21:51 Wolfram Sang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240805215123.3528-1-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrey_utkin@fastmail.com \
    --cc=bparrot@ti.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=digetx@gmail.com \
    --cc=eugen.hristev@collabora.com \
    --cc=fabien.dessenne@foss.st.com \
    --cc=ismael@iodev.co.uk \
    --cc=jonathanh@nvidia.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=m.tretter@pengutronix.de \
    --cc=maintainers@bluecherrydvr.com \
    --cc=mchehab@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).