Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2182137lqa; Tue, 30 Apr 2024 10:08:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqowL8tryUso3gNbgYtJy5bsSaS7mHKpDhxhKiq+0KsAysPAQqNTCc9JT2y+I4kZ/vxxaYg0kyeCJuSZa55LOwFwhyqf2vNxrX3bjNLg== X-Google-Smtp-Source: AGHT+IE2dhUNloWQFoItisZi8wCVsDJjhOfjXibbFGpVZbFbc4c9P31g8wQ0TGDRiqS5ZxlrmrCw X-Received: by 2002:a05:6830:10ce:b0:6ed:c39:715c with SMTP id z14-20020a05683010ce00b006ed0c39715cmr1543324oto.16.1714496894690; Tue, 30 Apr 2024 10:08:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714496894; cv=pass; d=google.com; s=arc-20160816; b=gI/s5crOuTvDwBOaS7I2z2ql7Eej4FR+GurSpYClCGHQ9smvncF3GmZ/THowTxxxvU jkchGT7zMqecKGdKXfd8RaN6cWiG8uBkYhtKjNJMQwHF6yZ7VmQsHTtR20bGsZKYi2BD nLCwcyLRyHJZyBb3oz3BWIz/Ij+5poxvbdqkDtbrzqzVNAU5SUneQ+G4pk/HXMd0y8bz YcBWfdS/yPPDT2zKSyKBmv4+1VdVBUlYaer/vsJ87c89zUV8Em5/cPXSpFqN/mjywGpc 0h3U+5sjnW2TS+8kV4CRTjJp56iCw4nG6FFvnn3JPWxcG4VJ40oNkFBxd4nk/lwgJ6Gh PKwA== 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=cJm3z5FT0Oo+l6VCaAOuDYeNie7Kc8h2n6BJIK32xLY=; fh=IHBVoUxgmk7VbWflhlhcsYH01/k9+MepDiEY6nvWmxA=; b=Pf9nUBwHvcFyf2Iea6alpvWT3UXTOhdtOxh4Bqz4UkHAf41ugGp7rhcowRe1B7E5Cp Kq8L0SzqGIcS4XDTqwpQhaLPvAXoD9dsC2cTwhxwGJ6/eD4Fgj6KxvDxpfmuSialJdjA DT0lCGtqH3Fr6v0Zkvz3iCE2aYO+nQnTTZPTBPtr3Vy1ORGY6/5LzF5s1c/5U6q0um6S QPqF3b0A1xOke3tMCOyWCcgutlSTBYyujEYF5bRZUgR/N1bUjk+HMSLjzkkcBIc6ySCW +tKriaUnaRaqwz+C2h9B2j9vy/zDd8mQQCxLEjqtkpwnYVcrnHuy/eScyyTyA8N/F3en f1Mw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hqx4LPrw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-3959-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3959-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x16-20020a9d6290000000b006ee48c936c8si1284169otk.187.2024.04.30.10.08.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 10:08:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3959-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hqx4LPrw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-3959-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3959-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 12A3E28880B for ; Tue, 30 Apr 2024 17:01:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2C65190684; Tue, 30 Apr 2024 16:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Hqx4LPrw" X-Original-To: linux-crypto@vger.kernel.org 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 B22A117F37D for ; Tue, 30 Apr 2024 16:56:15 +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=1714496175; cv=none; b=B7wSi64dHLeIiGZ6p2ouz6mF896Yg11c7x52zcJJhbi1DZL0y1W1rBcF/rKoRUU+QE2aLIpiMaBqgaHXSHxTOJSElF1/4IYj9lj8csBGbJTA89yK3wOV4VQ/ZWcpXkrC62fIxH7a0Ry5NINS261VKxTvLpOdp6X5mUyeC9U4ZOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714496175; c=relaxed/simple; bh=LUVmQSZ4qGo1AkTdWS5JEx7b3HeJ4vexz5J88zbpQjE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SUc2a3oGAkgu+7HghQ6amCpp8pkxOZzRi2rirbrBi3Oe95GayK74gJyVxBFAP0xxMQYjU9qCtuODUKZskqsBi132W1f++vd2VnqKSwjiwpXT1G+rpUjJgbfgzsyjPlbkmJUfyHkxNJaeILXbBbYbBUqb2EMd+D5xlCbeMSHO1gM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hqx4LPrw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21857C2BBFC; Tue, 30 Apr 2024 16:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714496175; bh=LUVmQSZ4qGo1AkTdWS5JEx7b3HeJ4vexz5J88zbpQjE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hqx4LPrw0PORrvdF4RCjelR4i59Wa8JFMieu8SEUPz72YovgD/fEeCZL5TRLMKw8v 1qcJyn81rnzeOU1JDD9Ts1dsqLNqyoA5XKpZEJYYEjQQOC/wh1IVPN1HE5z2mE+WZe LDhBqXo0tlWZnMdYjuqVYJm/YxmbmYkHtKbMgn9Rosk3ZbCZWtZiHoi3+FqynkTSR0 NK9GeN/Wj1FnqZ6fSG+UefBB3O62TVYsi3+CRpYJsbFMCUpPX6Tevha+IFkFuYeEzC gj1NDp7OofzP60qyL+J+qGcny+Dh3BfnoZ3BrjYQhMMa7gUABx2Zl3bLPBvfk+8cx1 OEcJhFDx76lKQ== Date: Tue, 30 Apr 2024 09:56:13 -0700 From: Eric Biggers To: Wolfram Sang Cc: linux-crypto@vger.kernel.org, "David S. Miller" , Herbert Xu Subject: Re: [PATCH 0/1] crypto: use 'time_left' instead of 'timeout' with wait_for_*() functions Message-ID: <20240430165613.GA1110@sol.localdomain> References: <20240430121443.30652-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-crypto@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: <20240430121443.30652-1-wsa+renesas@sang-engineering.com> On Tue, Apr 30, 2024 at 02:14:41PM +0200, Wolfram Sang wrote: > [PATCH 0/1] crypto: use 'time_left' instead of 'timeout' with wait_for_*() functions 1-patch series should not have a cover letter. Just include the details in the patch itself. > 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. I would understand it to be the remaining timeout, so I'm not sure the existing name is really that bad. But I agree that time_left is clearer. - Eric