From patchwork Mon Aug 5 21:51:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13754200 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 AEE94C3DA7F for ; Mon, 5 Aug 2024 21:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Kld3gE4SblWVR07LYX02//HCfm7mI5jj4CnBnZsYvAk=; b=fxsTxPgKJn1B1W chOYv/9WNOkfpYLC91UzWo/yD0bX90faRRPDajOeVKGAVyOWceV5uYcY5o47IqrUaGdPpt18YpeoQ z/RH9BQ0F7WT4oZ13pu0FX9O5vI4/QhUXVoiJKGAXfagBUNBOzGbnNnHA9vFxxRqyY0vhtQ3aWHWc f6th49/M5UX/agKT+auoewlD2Cchi4FBJhV/9qlg4YOsIjXoYK8YT6Jk1CTNt0xQvKm9n18wpNwPY JDIvC4LsQxzZiiPLbJiyE7Jbs3bxB2oF62ST/wp40kg0I3V4hsiRTQQ5lBjK71w/ZILcMUlC6nu7I cx51tDYKxXdIwuRPernA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb5cb-0000000HODm-1yok; Mon, 05 Aug 2024 21:52:05 +0000 Received: from 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 1sb5c3-0000000HO5i-1h8L for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2024 21:51:34 +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=Kld3gE4SblWVR0 7LYX02//HCfm7mI5jj4CnBnZsYvAk=; b=Z+ALS5GGswuWZfAv42bigkQU+z1T1U FAgPUWZj9zB10tkOLDWO/uV9oAuv/zKGSM1jtOQp07yru0thSeXbU6jZuqEKDFij FoOmL387TPexlhFcaYeICrnDT91mF3xRRzcBC1+fu6E5CbNX0QMBp05gKi4x7rcy Q/mH/hXllgQsajTSgZqWPy7gtuoYhMZ+C92qE7HsHgedRGmag1H7SA6HIn+Oo5ZS nu++LjsVROUyMF+NJqNo1/WUzFRWiJspN9ySW/ctqT7hBfpP7skDXZEHRBL8ONW4 7DU7q0vb2M3fKR1H8kvj4Z8M4MV+r+Y5JPVtYiXrjJrGZmBVRQ45MKsQ== Received: (qmail 18004 invoked from network); 5 Aug 2024 23:51:25 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 5 Aug 2024 23:51:25 +0200 X-UD-Smtp-Session: l3s3148p1@2RexrfYe4JRehhYC From: Wolfram Sang To: linux-media@vger.kernel.org Subject: [PATCH v2 0/8] media: use 'time_left' instead of 'timeout' with wait_*() functions Date: Mon, 5 Aug 2024 23:51:13 +0200 Message-ID: <20240805215123.3528-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-20240805_145132_314450_1160543B X-CRM114-Status: GOOD ( 11.99 ) 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: linux-arm-kernel@lists.infradead.org, Alexandre Belloni , linux-samsung-soc@vger.kernel.org, Claudiu Beznea , Eugen Hristev , Jonathan Hunter , Benoit Parrot , Wolfram Sang , Thierry Reding , Bluecherry Maintainers , Krzysztof Kozlowski , Sylwester Nawrocki , linux-tegra@vger.kernel.org, Fabien Dessenne , Dmitry Osipenko , Mauro Carvalho Chehab , Ismael Luceno , Andrey Utkin , Michael Tretter Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(-)