From: "Marek Behún" <kabel@kernel.org>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: turris-mox-rwtm: Fix return value check of wait_for_completion_timeout
Date: Mon, 11 Apr 2022 18:07:54 +0200 [thread overview]
Message-ID: <20220411180754.5b7ab6da@thinkpad> (raw)
In-Reply-To: <20220411104539.17971-1-linmq006@gmail.com>
On Mon, 11 Apr 2022 10:45:38 +0000
Miaoqian Lin <linmq006@gmail.com> wrote:
> wait_for_completion_timeout() returns unsigned long not int.
> It returns 0 if timed out, and positive if completed.
> The check for <= 0 is ambiguous and should be == 0 here
> indicating timeout which is the only error case
>
> Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Marek Behún <kabel@kernel.org>
next prev parent reply other threads:[~2022-04-11 16:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 10:45 [PATCH] firmware: turris-mox-rwtm: Fix return value check of wait_for_completion_timeout Miaoqian Lin
2022-04-11 16:07 ` Marek Behún [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-04-12 3:12 Miaoqian Lin
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=20220411180754.5b7ab6da@thinkpad \
--to=kabel@kernel.org \
--cc=arnd@arndb.de \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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