Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp556815lqa; Sat, 27 Apr 2024 13:37:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRYQR/6IHjWm8DSb2VMiYEH13my6wMxKhtFtmK3uYB2QgUYclowpwKl1laLeRUAvvhULCQD69+jbh0fnYU4goMgixjBQOuslz6heo2Ug== X-Google-Smtp-Source: AGHT+IGc1prOAmvcopB84ab6YbaUn9VVE6cINf8xOVQlnWtF5xiwgt6shDct63BAhFA85Fkd9UsZ X-Received: by 2002:aa7:888f:0:b0:6f3:f447:5861 with SMTP id z15-20020aa7888f000000b006f3f4475861mr2194854pfe.5.1714250244319; Sat, 27 Apr 2024 13:37:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714250244; cv=pass; d=google.com; s=arc-20160816; b=rkXFWSf78ciDSXkPGhnGISWlNbImhSshJP2Q15Fmlp8TV3KsFrI+EOGxzgIgyaS/9C gnzoHjSekz+X2ZeUYbffBlPMfFVnCoZqGELnL0pt8WdiBypMrUCiEncC7p9hw+dL5A01 ZAFW6qqBkoJ0OQ9Bz480Z5QKeymgbDNQ01zSvf+Lq2YZKPY68f0ZFuub3eBbpflU+qgh 7qvh/NvHF5R9gw8Kulib58/i1l+nYuvSF/M91TidPkvJAVLpbDwg9CznDseOSyqwWGrc GB2HDeAuhfG8hj1R9qbc4lLPIqPNqGWVwKNg7XgiaeQ7+XwBJkdFy8sbgDHb09HuONQ7 C6ag== 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=vucjjM3RsCbo5+FPCKzNEmVbLons1oLEEtyP6oygaEw=; fh=gep0fajyD++9FMFl6m6u/Et7/4SnCdyTZBJycEb1IeE=; b=ecaOquM/5bC9ZgVgvg062FW9QTqs019uGbFTU8I4XmfFjiXQITAjgUdehyEuOVXfD3 yCPoK+nmAG19bQLrOoYNRsKoBHnXzd/+vdkY/lbd9AJUkwrsLXnvcDBc1T/LqvHiGY0W HwRphSI19bGMmLVQWdMkB+vUa15N2XJfIUHQQzlpiu1OD5hxjWEJsLTcaLYU46FGc4ye gYdsA46zVPddx5jy2AmRDfImZ35G6HnMKqLdPfQdjEJn94V05It6LVzmmv6hUbUeRiBA OdpcZCfDymyz8JJbdsKgMMBkq1XJD1Td8n64TohcnRTmVwuQxZE/qXtEEFt5xsko2KMk SyMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b="J/dbn4NF"; 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-161169-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161169-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ei3-20020a056a0080c300b006eab1d8a23asi17353075pfb.172.2024.04.27.13.37.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 13:37:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161169-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b="J/dbn4NF"; 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-161169-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161169-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AF18CB21713 for ; Sat, 27 Apr 2024 20:36:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7343D1465B1; Sat, 27 Apr 2024 20:36:22 +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="J/dbn4NF" 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 E1267128365 for ; Sat, 27 Apr 2024 20:36:16 +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=1714250181; cv=none; b=rdC3NUgs+8z3FkUBnjogFkQkphEzoEBXF60pIW7s8+nalEc4O35k7/l6hk534r1BED59kShybXTL6A05qrby/VbryEK+9o5jnnUFMvZKjO4tm9u7IaikSOmfVhUi3o6hrPlYO4fd796AxcwmJcRGJnCodrTYwmnc31Oa+OWiqZw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714250181; c=relaxed/simple; bh=Tx0G6b9JwQMFmz7pulrhML1UHa1rgqE/GzFQrCputUY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IdPjEglh3718zZEbABysrEKay+AqpINoXiiTGwtf1TlVABgEtfmXbNYv9QZIzB//pw7QVCN0v3l6t/vnOtpOS1Tn48yjoiCWhifsfyMjKLD5erSi0//LpfYsXQh0CYeD9DbQ6rn8UlEDyGyc9551UjgXc0qB/fm0U4o9qYk1HxY= 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=J/dbn4NF; 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=vucjjM3RsCbo5+ FPCKzNEmVbLons1oLEEtyP6oygaEw=; b=J/dbn4NFhpPLnpA2UHgTAGogwIkFVU c1Oe144PmBmlBY7G1bZjfrO64wUSfJItMs30Ey1vHza/lqVrpXpu3HBC64PtE6wm PM643I22QuBpe+FQCCFBy9C1g8B/+qKR2wnguasGV7MKIQhjrLfC6ogaEikc7wZg NXKz5ylEb6ox+6JSJCa222bDqBSM7wjjeZmD2itN/VEqY86s1JzjVcawhMT0dNBB ZfrCpu0HSx1LJTveW87o2Bi1Cr36obPwq5lvaoeqdeUgwJOFx2FSWFozO2gDVB1+ r2IRSzGgTFNtpEl2Svq5p+/Wg9jwOurnZVwcxRc0W7D4YqCilqvAW/8A== Received: (qmail 1781755 invoked from network); 27 Apr 2024 22:36:14 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 27 Apr 2024 22:36:14 +0200 X-UD-Smtp-Session: l3s3148p1@ZFeo+BkXsI9ehh9l From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-omap@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 00/15] i2c: use 'time_left' with wait_for_* Date: Sat, 27 Apr 2024 22:35:52 +0200 Message-ID: <20240427203611.3750-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_*() 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 self explaining. This is the I2C part of a tree-wide series. The rest of the patches can be found here (slightly WIP): git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/time_left Because these patches are generated, they need manual audit. So, I will send them step by step. This is part 1 and also a call for opinions if this is a desirable change. But at least in the I2C realm, I really want to have it proper. Build bot is happy with these patches and I also compile tested them (except two). No functional changes intended. Wolfram Sang (15): i2c: amd-mp2-plat: use 'time_left' variable with wait_for_completion_timeout() i2c: digicolor: use 'time_left' variable with wait_for_completion_timeout() i2c: exynos5: use 'time_left' variable with wait_for_completion_timeout() i2c: hix5hd2: use 'time_left' variable with wait_for_completion_timeout() i2c: imx-lpi2c: use 'time_left' variable with wait_for_completion_timeout() i2c: omap: use 'time_left' variable with wait_for_completion_timeout() i2c: st: use 'time_left' variable with wait_for_completion_timeout() i2c: stm32f4: use 'time_left' variable with wait_for_completion_timeout() i2c: stm32f7: use 'time_left' variable with wait_for_completion_timeout() i2c: synquacer: use 'time_left' variable with wait_for_completion_timeout() i2c: jz4780: use 'time_left' variable with wait_for_completion_timeout() i2c: qcom-geni: use 'time_left' variable with wait_for_completion_timeout() i2c: rk3x: use 'time_left' variable with wait_event_timeout() i2c: s3c2410: use 'time_left' variable with wait_event_timeout() i2c: pxa: use 'time_left' variable with wait_event_timeout() -- 2.43.0