Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1963855lqa; Tue, 30 Apr 2024 04:54:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPEGCsZypLFdhX02OAH+zKmesUtdTPXvebhzBlp9DPJYfsYha2RKIXfUV/e6HoA9h8o5dRdxGLHPoqjf5XQovpFAKJolLvXUfEIFjyZA== X-Google-Smtp-Source: AGHT+IGq1Z+6Hf7ZaTXBwlbhkpqPjNKaGsg9lNVko4+8bzet7clV5PHp9Vp9+rryip4AhYPz1rWY X-Received: by 2002:a05:6870:4589:b0:239:18d8:1519 with SMTP id y9-20020a056870458900b0023918d81519mr14576027oao.46.1714478089278; Tue, 30 Apr 2024 04:54:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714478089; cv=pass; d=google.com; s=arc-20160816; b=BGN46drqvHwMBHktH5bDcqaMK1fijkP3YjRmqLMsa3+9oIm0BTuDOldSKSZXjuEuSu w9FAsnIejSErIZAzdg9YRrK91WAP0uMU5E0zqtP1GsnZv+9oqzTbQDTPzK3rK0ofMxP6 QAherEXGLi6MQbvh1qOHzVllBQw1SLTw2FEed/0JhHolTh47cIWKqa6sfJRF92Vd2EPW Q8E1znqW3huxbPREEZkAOjwT7npaLZfYcqSYMP7KKqbRL3j6Uv5ljTvfneySK4dm3QL6 suqrD2zNXJGxTO0Nudnw/7TlydCbSCfrSNA5rtupBvJF6hI7jBAF0Htt3kPOraMkvjmk laJg== 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=wu/qhcWtV7OY0JN4E7D/iNzNkQ/EkgfsbfNGnSZA7Go=; fh=r+LtKz8DdWLYpV34L5mimBBP64XSZYqJeiS/ojYwzPk=; b=sSXT+xC0ZUEY0MUTmIiRr2UmOLqP3jDDMTNVqeVMkbBUTElFzT2GiCsuHOG3EYC6y0 GXjMU2mWIMrqp3oLeKAcEEzZLDV1lW6XCsZtHar9samoDrBBzTrLNx5lLQygkYA4Zjp0 IDRPJywCHXkBM6JmvsQaeMGkNyV35p/sxsAS1Ro3x1v8LIY0lonylftUS598IyqDVpDU IEL9WD5Keasv1lxk86SUaMJBa69xoGmgBi1SpFXh1l+LK41omBK0fTs/pvMhDEIBjQyy nIoZVNqcmNqU7j+UauCGinN61i4fb4M1/kaHe1eiCfqzkVFTLF1skn0YLQc9ERjemNgH tNEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=Ehtc5jzT; 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-163870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163870-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p32-20020a634f60000000b005dca7d50880si22152423pgl.696.2024.04.30.04.54.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 04:54:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=Ehtc5jzT; 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-163870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163870-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DD5B3284DB7 for ; Tue, 30 Apr 2024 11:54:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E26113D277; Tue, 30 Apr 2024 11:54:43 +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="Ehtc5jzT" 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 D2D1813C9C3 for ; Tue, 30 Apr 2024 11:54:40 +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=1714478082; cv=none; b=X8NIXWcbuW118QxvYpCo3mci5Cd9xTy1t43KWvnVG9dbz6lj7Wsf7Sdv8SVhoh723DJjXGZvpOgDtDZUl0VvC+AE2sIeOzwAZqlnAoo5QzZ6zimHbseZ4+yweeJXuhI6GUmyteInKg2tTND14PGgOFL9rx6NFnVJoKlBShbKVbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714478082; c=relaxed/simple; bh=uLSlj939XV8NBcLkdHeM4WkD/CoBnFZy5OTyuh04CxY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pO+kXs9aBG+O2C6E8hG0pkWeAfi8ugeISAm970UN5wpAMbqQthQxwPapj7ymTDfaEgvOKWJ8QtZegEjcYRzopl9PsDvb7k8zoj/ZioS/4MQoPDYqZRWJZqpaqQ7op3gz4hm79nGik84DWO9iNnoYNPpSmOzR4qp/e5DIXWoqCqY= 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=Ehtc5jzT; 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=wu/qhcWtV7OY0J N4E7D/iNzNkQ/EkgfsbfNGnSZA7Go=; b=Ehtc5jzTSgAhzTN+5VDaHzhJ3CIZkf yjvF+nachfocPY+LnBFurXN11ZR28tr1kUdMMiuQp96tvCdxCiyr6SQRNKVIdTfa +rG0KknZdCgD0cVxwGgBRktJehHz1JnyFzRegOO0YMb+JF4cRRzKGdkaRFXZdti0 HG+BF1Lzt/+PLw8+Q3yVa5OPZUNGV44vRXIWY2CA+ZD4XHbhH/jKD7L+gedFGX+z 3HH6p4vFWQCLqQ8LSm7jA0hOkumEZspJhI3nhWUu0ax/xw4D3C9ko9zd3Tdonj+D 4+iTCQcKS0zgMwulq4rWfOMl3y9QM3R9k7cVPl+V9f7s5h/Dgmt32aRQ== Received: (qmail 2621450 invoked from network); 30 Apr 2024 13:54:38 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 30 Apr 2024 13:54:38 +0200 X-UD-Smtp-Session: l3s3148p1@b+DXCE8XMKtehhrb From: Wolfram Sang To: alsa-devel@alsa-project.org Cc: Wolfram Sang , Jaroslav Kysela , Liam Girdwood , linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Mark Brown , patches@opensource.cirrus.com, Takashi Iwai Subject: [PATCH 0/4] ASoC: use 'time_left' instead of 'timeout' with wait_for_*() functions Date: Tue, 30 Apr 2024 13:54:33 +0200 Message-ID: <20240430115438.29134-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_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 (4): ASoC: codecs: wm8962: use 'time_left' variable with wait_for_completion_timeout() ASoC: codecs: wm8993: use 'time_left' variable with wait_for_completion_timeout() ASoC: codecs: wm8994: use 'time_left' variable with wait_for_completion_timeout() ASoC: codecs: wm8996: use 'time_left' variable with wait_for_completion_timeout() sound/soc/codecs/wm8962.c | 12 ++++++------ sound/soc/codecs/wm8993.c | 12 ++++++------ sound/soc/codecs/wm8994.c | 8 ++++---- sound/soc/codecs/wm8996.c | 14 +++++++------- 4 files changed, 23 insertions(+), 23 deletions(-) -- 2.43.0