Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp846822lqj; Mon, 3 Jun 2024 02:38:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBgpw46VMlS/cyWVKUlth3ZJHN5QCtXH4CKWovcRS4nrEE7JEyxHrKz0Gm8/tiMMaqPbPD/xUMZ3digN0eBiGjTr6tVoMbFFB2yrjZcA== X-Google-Smtp-Source: AGHT+IG+1LLLHPb8EuprxrSfqOnmOCBBYzF1fn0ISnop09ftpRWbuuZ1Yu9hQYcpGUUEpYqFMvGj X-Received: by 2002:a17:906:8419:b0:a69:b5:def2 with SMTP id a640c23a62f3a-a6900b5dfd3mr179616566b.6.1717407510180; Mon, 03 Jun 2024 02:38:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717407510; cv=pass; d=google.com; s=arc-20160816; b=0vySsL+xOJirg2RPGqWZq6m870RVaoUM9SAf+d+mWAyTUTkWaKcSKq44ACEpOl4GmO oiNMU9tR8eUHPI9l7eUJctLat+jMAPV+6ejL229fjQBeYDdcC/5aSHUICfffO9PJ18mL 07QmKrmpCnbj+O9Ro2g4Ll1QWNVtEHHGlsNeWElqi5ull4OpAqLiThYWZf9dnWBQKNDa bp3lBaEfJ8a//FgxbgOciIi15VRDlBfUyxIUqVvZEL2jxtkcigg0gXyH/DPbwiYnw8bX udpHrUyQVeoYli7gFlcwYMjx4y7Vp+8p+rDWU25jjbgbZ+VOWHN7htLEne99DRBAyZ11 p2yw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Cg0RSHzMUEKoayW0txderNSqwftiCY7G+69iwzXz2TM=; fh=PIKpVMYdxVN2t13Q3TqJNzQnzLv9fRR1i70eAGypGGQ=; b=OuU3nT6nbepCygnLDE91HN5uSFtKQZz6XSh8UbKJ+ouLOyEqHYy8kzyT1LGQ5pZtmi LBikdB3XNs91M9RQ6yn+C093PePdDBCKb/5IBTqhOpdgblwnbx0JieAuC25LEuAp2gXA 9d44pf18TqUkgvO6xjGsf7ivBGaa8IXctMUynjx1hZfTyn4+WP4C5hNwt4fCXl7sdps7 2CiRitGYVwO0AuwdNz01zg0zLx48IooXrhSOnUA/FtzJA5X6SPevMvtn9atVOzxpaNE9 DT/a3t4RBsWCAZqWgvZ8McU+mq89e3ae8eBI9cjsDna+sKdwnqDG/Guxnj+JlhFMlCyP frVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=BN8Av7d2; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-198868-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198868-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68c509434asi214836566b.416.2024.06.03.02.38.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 02:38:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198868-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=BN8Av7d2; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-198868-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198868-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 975961F24413 for ; Mon, 3 Jun 2024 09:29:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AED381AC7; Mon, 3 Jun 2024 09:28:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="BN8Av7d2" Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 126B88062B for ; Mon, 3 Jun 2024 09:28:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717406930; cv=none; b=RiDeWdAzcbtnrceVhtYmlBYhAjxvp46q24p4fn0C3yqYPUQNXM34TnZ3rYh+/KzG/NLgRITYbICiMGesaA4kze81o5LYu+J+h1q/l5pm489QTzO7YXAZ62R7ZjLWf6iiKL1+8cSYKp84c9KKGwLlHLRrPGYVKk7H6GZnQgHspdo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717406930; c=relaxed/simple; bh=9j/1lmebo/z19m1KypYAjU75AQb3RkUc+Qhh2gWNLJQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qB3VxTjqxfwSJTDOe/QlE1uUO9L4kibZKUQCSiRE+aaVDQSCn9rwB2YX0BflHsx+3WwHhlSkp36UKo53E9WX0vh48P9ps1uTHhieXh/Zp0efdgUt2h7JpkvkChJehpuCcb2M7uUWGwrEl9jiwVl3HGOvclS8e3RgicaCGtdKhdw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=BN8Av7d2; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com 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 Cc: Wolfram Sang , Alexandre Belloni , Andrey Utkin , Anton Sviridenko , Benoit Parrot , Bluecherry Maintainers , Claudiu Beznea , Dmitry Osipenko , Eugen Hristev , Fabien Dessenne , Ismael Luceno , Jonathan Hunter , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, Mauro Carvalho Chehab , Michael Tretter , Nicolas Ferre , Sylwester Nawrocki , Thierry Reding 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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(-) -- 2.43.0