Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1699030lqa; Mon, 29 Apr 2024 17:08:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4BJRKGl2AAT8Nlj+RdMMxf4lTaERxq5OaHWNILlSnJcBnn+8E9ZPWVy8kxEFyvxEJ4pRchjMH5fXAaCnaoD6qmI/E6/PyFI2GNNFEWQ== X-Google-Smtp-Source: AGHT+IGqjx7JWVICvDaqDB3craZalDFWdeIgxPlN+QPotcoXl1BNX8krZV1H7wrEkBlOqmiqZFuO X-Received: by 2002:a05:6a21:998c:b0:1ac:efbd:dc46 with SMTP id ve12-20020a056a21998c00b001acefbddc46mr14575772pzb.2.1714435681138; Mon, 29 Apr 2024 17:08:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714435681; cv=pass; d=google.com; s=arc-20160816; b=x/8Tzitt/r6TFOs9+DipY5lwn/XqPSNM5YgzCfoABFKYXOfk1CTk8f+dEFgdI9pUqN v6UUsbDzbzUnNnRAcDF+uQ2jvAXVOCKxl/tDUbMalioReFMh6kbkrAPjDG02mesoK3oT FPDgUaszCRvYR5fMdf3U4cqrROQQyaMPRCp76XZYTinhQPgrQlayI9JVz5P6DQtGe6J3 7L+h5DMholcgDQ7Ae4c2LTazDcgJuO0RY7WexGp1UaBKRlaeWdX0wHUV2NMD99h0GCjx 6WJYeQZZOP0/8ouTbPtX4vNWveJpiQkzHCYlfND8wpmxj6LV7x4y9dVABZsL1JMs5xhS 5THA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/2hwFpOVa7UEBbLKyAfuzrTkBKTAzPKQzAPUDHlD9x4=; fh=Q6XhiVJbNHGlnkPZuso/azJN6JecZBEZMwzyYkqIW74=; b=ECltbSbwb6aXcHSsKrH0DY0eLtmHFNQLUG3ikCHUlmnnGt2GFwF4YMqeJMEAXbZ3Kd QhG2EeTjSt7jiHAPCTYTxDh04D2gggTrhKldUa3ye96deHaifFK0LQ6AQtcSIMhT8aSt Snt9HJy8juxLXltTc+6bNdgvE424HhNoof8CA8OGDmfiyFw9fk0OpI5jIzMhjuhZZZh2 7iKcWlIw/sHptmFWWwqKrEs6hl5JH8lUD/uMgOuYOk0WmtLhxARe0JzE9b3JCA2n3qOH lE17/x3r+gbBCjwCsEblpdrECNchzKhptZT56FDzJ1fK2khc+lqEocI4+So/da76ny37 Ru6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YCQ7Y/lG"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163172-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 o9-20020a056a001b4900b006ed99532c2asi20537010pfv.296.2024.04.29.17.08.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 17:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163172-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=@kernel.org header.s=k20201202 header.b="YCQ7Y/lG"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163172-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163172-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 55524283D29 for ; Tue, 30 Apr 2024 00:07:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6750A1FA4; Tue, 30 Apr 2024 00:07:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YCQ7Y/lG" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 61507170; Tue, 30 Apr 2024 00:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714435669; cv=none; b=DP9y8cVFo3340WSCu8pxSCdkpyqY3f/Q0SLOqyvyOJOfkPmmIYoLT2yGZS/DbJbSFzeAUnyDbPggkZT0Tm5b0mNGVNDP7D7I/Xe6oZFlASG9WjJ2qwWJRrvqOev0LYwRu1kKFFypwrJxu+LGOEGLkkIjFUvC7IURI+H+4zE3wP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714435669; c=relaxed/simple; bh=vhMJowDwRuHTlntrjfGcVCQMNqbpSZQLuzucFeDjBg8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EiRdzf4VOzPiJor1k+axXrzinfSLZwXBaYwEjd165VFv5V8nOeDiLLvL7X/kAIMIBewx4OXodYIPAZ8f7DoAm5D1oQONiy1ZU9oRvvy5lTw9CKdzREii2wghyW4d1T1K40Q6yVHsd0SenCIZyHb2zils0JZeZ9WfcWd2Bxhx1KA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YCQ7Y/lG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79B9BC113CD; Tue, 30 Apr 2024 00:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714435668; bh=vhMJowDwRuHTlntrjfGcVCQMNqbpSZQLuzucFeDjBg8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YCQ7Y/lGUacL2IZijCKBlGObESxVjjzsNASBP6BpxH7vYi0yR/wJ2unwlXZKOgThD Bq45bgnTPaVF7espT+Nhd5rEHV2F1W1XQ9W3pUqNK7HsrhdCigz5URD9um1NcrO07A 9Rru4vTA2LWW2s0BlH+12gPtJCa4vWrNjg//+P5CooPJo1vEZWZRaw561F6OuM5n9B HptYENweRlTg8pMcX2pRffTkhIH4rQCk7KUu4bLw5KlYtCMK4LKva2NYtjvccX2h9y bCa2bYiIjdF3covsdemMsir4FU94t25zzA82/eE7zzn5O+wmQGg1yi3ETGyQAfGXFt MPE8NlBvInCdA== Date: Tue, 30 Apr 2024 02:07:45 +0200 From: Andi Shyti To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, 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: Re: [PATCH 00/15] i2c: use 'time_left' with wait_for_* Message-ID: References: <20240427203611.3750-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240427203611.3750-1-wsa+renesas@sang-engineering.com> Hi Wolfram, On Sat, Apr 27, 2024 at 10:35:52PM +0200, Wolfram Sang wrote: > 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. It all looks good, I will give people a few days more for reviews and comments and then I'll take it in. Andi