From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-i2c@vger.kernel.org
Cc: Paul Cercueil <paul@crapouillou.net>,
Andi Shyti <andi.shyti@kernel.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 11/15] i2c: jz4780: use 'time_left' variable with wait_for_completion_timeout()
Date: Tue, 30 Apr 2024 14:43:40 +0200 [thread overview]
Message-ID: <85cfd4f4-ce6f-4c38-8c51-25c72e3ffa9f@linaro.org> (raw)
In-Reply-To: <20240427203611.3750-12-wsa+renesas@sang-engineering.com>
On 27/4/24 22:36, Wolfram Sang wrote:
> There is a confusing pattern in the kernel to use a variable named 'timeout' to
> store the result of wait_for_completion_timeout() 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.
>
> Fix to the proper variable type 'unsigned long' while here.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> drivers/i2c/busses/i2c-jz4780.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2024-04-30 12:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-27 20:35 [PATCH 00/15] i2c: use 'time_left' with wait_for_* Wolfram Sang
2024-04-27 20:36 ` [PATCH 11/15] i2c: jz4780: use 'time_left' variable with wait_for_completion_timeout() Wolfram Sang
2024-04-30 12:43 ` Philippe Mathieu-Daudé [this message]
2024-04-30 12:49 ` Paul Cercueil
2024-04-30 0:07 ` [PATCH 00/15] i2c: use 'time_left' with wait_for_* Andi Shyti
2024-05-02 11:29 ` Andi Shyti
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=85cfd4f4-ce6f-4c38-8c51-25c72e3ffa9f@linaro.org \
--to=philmd@linaro.org \
--cc=andi.shyti@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul@crapouillou.net \
--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;
as well as URLs for NNTP newsgroup(s).