Re: [PATCH v2] firmware loader: log path to loaded firmwares
From: Luis Chamberlain
Date: Tue Nov 12 2019 - 19:56:33 EST
On Sun, Nov 03, 2019 at 01:06:46PM -0500, Drew DeVault wrote:
>
> This is useful for users who are trying to identify the firmwares in use
> on their system.
>
> Signed-off-by: Drew DeVault <sir@xxxxxxxxx>
> ---
> v2 uses dev_dbg instead of printk(KERN_INFO)
>
> drivers/base/firmware_loader/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
> index bf44c79beae9..2537da43a572 100644
> --- a/drivers/base/firmware_loader/main.c
> +++ b/drivers/base/firmware_loader/main.c
> @@ -504,6 +504,7 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv,
> path);
> continue;
> }
> + dev_dbg(device, "Loading firmware from %s\n", path);
Because this is dev_dbg() I'm willing to consider it, so that its not
always enabled. However its not in the right place, the code path you
are addressing is only for direct filesystem lookups. If that fails
some systems do a fallback call out to userspace. To cover both cases,
you want it at the end of _request_firmware() on the success path. Can
you send a new patch?
Luis
> if (decompress) {
> dev_dbg(device, "f/w decompressing %s\n",
> fw_priv->fw_name);
> --
> 2.23.0
>