[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210726180744.crfvxbuyz2bjw2o2@garbanzo>
Date: Mon, 26 Jul 2021 11:07:44 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Anirudh Rayabharam <mail@...rudhrb.com>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org,
skhan@...uxfoundation.org, linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH v7 1/2] firmware_loader: use -ETIMEDOUT instead of
-EAGAIN in fw_load_sysfs_fallback
On Sat, Jul 24, 2021 at 05:41:33PM +0530, Anirudh Rayabharam wrote:
> The only motivation for using -EAGAIN in commit 0542ad88fbdd81bb
> ("firmware loader: Fix _request_firmware_load() return val for fw load
> abort") was to distinguish the error from -ENOMEM, and so there is no
> real reason in keeping it. -EAGAIN is typically used to tell the
> userspace to try something again and in this case re-using the sysfs
> loading interface cannot be retried when a timeout happens, so the
> return value is also bogus.
>
> -ETIMEDOUT is received when the wait times out and returning that
> is much more telling of what the reason for the failure was. So, just
> propagate that instead of returning -EAGAIN.
>
> Suggested-by: Luis Chamberlain <mcgrof@...nel.org>
> Signed-off-by: Anirudh Rayabharam <mail@...rudhrb.com>
Acked-by: Luis Chamberlain <mcgrof@...nel.org>
Beautiful.
As you see, without any of this documented in a commit log, the change
would have been very obscure. Now we cleary document a userspace
changing return value clearly.
Thanks!
Luis
Powered by blists - more mailing lists