From: Eric Biggers <ebiggers@kernel.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-crypto@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH 0/1] crypto: use 'time_left' instead of 'timeout' with wait_for_*() functions
Date: Tue, 30 Apr 2024 09:56:13 -0700 [thread overview]
Message-ID: <20240430165613.GA1110@sol.localdomain> (raw)
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
next prev parent reply other threads:[~2024-04-30 16:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 12:14 [PATCH 0/1] crypto: use 'time_left' instead of 'timeout' with wait_for_*() functions Wolfram Sang
2024-04-30 12:14 ` [PATCH 1/1] crypto: api - use 'time_left' variable with wait_for_completion_killable_timeout() Wolfram Sang
2024-04-30 16:56 ` Eric Biggers [this message]
2024-05-10 9:21 ` [PATCH 0/1] crypto: use 'time_left' instead of 'timeout' with wait_for_*() functions Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240430165613.GA1110@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox