From patchwork Mon Jun 3 09:28:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13683442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DB0FC25B75 for ; Mon, 3 Jun 2024 09:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=H5AO3uNLLWCrYAFse/JxTvbp8BnH1wahW225WbNvjgU=; b=ZH6j4t66fhTu2k sI6WMI3rnVORbxilHlI8khOP9SLamYiD9E0czDYBwmoF72hCqhtvYe8IrYU4FEtz9IT2zyyerVr5n IeGs3dVF2Nj4XyWYqZvecaze2kGHWzBXBUvm0L5olfgm5R7cEfBgvFQbOzekRmgl/laFggHkNrZOh j6bjSyOhWPhZG3RDWaO79J8LeZ9r7jzm/I+UbHwG1gUeDDeIwpFXWHSAS/bxZLieAUo2xhaEfqdTi foKm6P79w6V9Ir14DLmRPJY+6VSK1QwH+bWjr6Cz+d8v+xSwjPf/GLIzUbCat17EpLFvjeKDE0cm8 mZXZ8geE0jm9f/zJbSzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE3zp-0000000GCSG-3plF; Mon, 03 Jun 2024 09:28:54 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE3zl-0000000GCRW-1ZfM for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2024 09:28:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=k1; bh=Cg0RSHzMUEKoay W0txderNSqwftiCY7G+69iwzXz2TM=; b=BN8Av7d2legDZ1XEcvpSV8644KOEUL zg5h3xDYrnnJrzscjs5PdRQ3vZpGPBYyUTcttkG8Dmgb9lYcrK5sxGxbC5SV8U+6 MbDPTTizOgQEtW2a4V3dYuh6wK3VkXFOOThdZRJTYVuY6hyXUUHFKTZwBcDC4UfA AkguzOg0jXd2TyJ4zaEoiAkFz0uQ9aLrqTlAGw0aL849zXaUiZSfAAv2hmKNoZ6R KiPvr4eG/YnQnxv5WY9COxXbEW8kBSU86z3RQ0ffP3JB0hHJYN5K/x/0zbauP6/t BsJ7vGhCjrtOZCq/pdMwtqWLRjQhRMecRLp6t9VDlzLNdegGgunwheOg== Received: (qmail 1903014 invoked from network); 3 Jun 2024 11:28:46 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 3 Jun 2024 11:28:46 +0200 X-UD-Smtp-Session: l3s3148p1@ITXK9fgZGJEgAwDPXzLGAH1eNELjOc3g From: Wolfram Sang To: linux-kernel@vger.kernel.org Subject: [PATCH 0/8] media: use 'time_left' instead of 'timeout' with wait_*() functions Date: Mon, 3 Jun 2024 11:28:31 +0200 Message-ID: <20240603092841.9500-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240603_022849_830740_EDEE2C7C X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Claudiu Beznea , Wolfram Sang , Thierry Reding , Bluecherry Maintainers , Sylwester Nawrocki , Dmitry Osipenko , Andrey Utkin , Michael Tretter , linux-samsung-soc@vger.kernel.org, Anton Sviridenko , Krzysztof Kozlowski , Jonathan Hunter , Fabien Dessenne , Ismael Luceno , linux-media@vger.kernel.org, Eugen Hristev , Benoit Parrot , linux-tegra@vger.kernel.org, Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. 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 | 16 ++++++++-------- drivers/media/platform/atmel/atmel-isi.c | 8 ++++---- drivers/media/platform/nvidia/tegra-vde/h264.c | 10 +++++----- .../media/platform/samsung/exynos-gsc/gsc-core.c | 10 +++++----- .../platform/samsung/exynos4-is/fimc-core.c | 10 +++++----- drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c | 10 +++++----- drivers/media/platform/ti/cal/cal.c | 8 ++++---- 8 files changed, 40 insertions(+), 40 deletions(-)