From patchwork Tue Apr 30 12:00:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13648880 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 838D2C4345F for ; Tue, 30 Apr 2024 12:01:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 20AC4AE8; Tue, 30 Apr 2024 14:01:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 20AC4AE8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1714478511; bh=2qcLEMK1Fn+N0abKR6SrQ01XTQjI1OvqZUs/FLQLSeI=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=ZHF00J/jBkXyLYSbXKQqBNf2txf1w81C2t+oT0ZAqNcx3VzyOJABxB5UaPxJJOLg2 v6FMZJkt4NBLvVqhNxcUJQkSJoaIK3GEIDq1tnJ4TjyKPZguoWVA+pjBstWYPzqREN evINBogNY45npxIdi/nmL0RBfdOesf22DyvQPGP0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 788BFF80588; Tue, 30 Apr 2024 14:01:19 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3309FF805AA; Tue, 30 Apr 2024 14:01:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C4652F8028D; Tue, 30 Apr 2024 14:01:13 +0200 (CEST) Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 41BCBF8025D for ; Tue, 30 Apr 2024 14:01:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 41BCBF8025D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=sang-engineering.com header.i=@sang-engineering.com header.a=rsa-sha256 header.s=k1 header.b=S30pyaCb 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=D4ut/b+eS62cUy c2wWIOIQ5QpP8PK3TWPgfE/RDJDnI=; b=S30pyaCbmwexde786Jy4Fc3AJ24k2V +NigbBApY1TKSe0WuS2Alkh4K9AtgY8/l00gCXqACqtmWBgd75QSy8ZjFox7v1Jh xjKccZKMGutjG/KN5YcRlzdd3EUIZz9ndG35GlNowpgF19ocEzGo8tzNX0j4g9RQ /25JaC+OfqitGiKG1tv2EaLy4DtrPIpzx7xkCUDBLVz7dxA2ymr3SO5fBnVlgObg 2ZteiSMn+CtE30JNk6hoehaQUopfYrtYo2LcYrbWPEjKWs1+PgutmHKz4/rPeiAN jku8Pc4wvNza9mtMTYyQrcCHHOeWAv0Q3xLmGWn+bEiR3OQ1LQNs6Zmg== Received: (qmail 2623430 invoked from network); 30 Apr 2024 14:01:02 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 30 Apr 2024 14:01:02 +0200 X-UD-Smtp-Session: l3s3148p1@kdO5H08XjpZehhrb From: Wolfram Sang To: alsa-devel@alsa-project.org Cc: Wolfram Sang , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 0/3] slimbus: use 'time_left' instead of 'timeout' with wait_for_*() functions Date: Tue, 30 Apr 2024 14:00:58 +0200 Message-ID: <20240430120102.29459-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 76LTYY7GBXJNRBBGVFJR2YO4QNU6GHWH X-Message-ID-Hash: 76LTYY7GBXJNRBBGVFJR2YO4QNU6GHWH X-MailFrom: wsa+renesas@sang-engineering.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_*() 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 (some parts may still be WIP): 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 (3): slimbus: messaging: use 'time_left' variable with wait_for_completion_timeout() slimbus: qcom-ctrl: use 'time_left' variable with wait_for_completion_timeout() slimbus: qcom-ngd-ctrl: use 'time_left' variable with wait_for_completion_timeout() drivers/slimbus/messaging.c | 9 +++++---- drivers/slimbus/qcom-ctrl.c | 7 ++++--- drivers/slimbus/qcom-ngd-ctrl.c | 29 ++++++++++++++++------------- 3 files changed, 25 insertions(+), 20 deletions(-) Reviewed-by: Bjorn Andersson